Reputation: 11
I have four legends say .... Product1, Product2, Product3, Remove All
now as you guys know every legend have a colour symbol called legendSymbol in front of every legend name.
I want to hide or remove the legendsymbol in front of Remove All legend name only? Also I want to have more gap between Product3 and Remove All like below Product1 Product2 Product3 Remove All
Upvotes: 1
Views: 3690
Reputation: 761
I'm using this to hide the symbols
legend: {
squareSymbol: false,
symbolHeight: 0,
symbolWidth: 0,
symbolRadius: 0
}
Upvotes: 0
Reputation: 139
Use second argument callback function like this
$('#container').highcharts( chartObject,(chart)=>{
chart.series.forEach((serie) = >{
if (serie.legendSymbol) serie.legendSymbol.destroy();
if (serie.legendLine) serie.legendLine.destroy();
})
})
Demo https://jsfiddle.net/fahadsaeed/zm763rcq/
Upvotes: 1
Reputation: 41
symbolHeight: 0,
symbolWidth: 0,
symbolRadius: 0
Set this code inside the legend array
Upvotes: 0
Reputation: 17791
One quick easy (imperfect) solution:
http://jsfiddle.net/jlbriggs/JVNjs/295/
type:'area',
color:'transparent',
One more complicated example that does a variety of things, including placing a button on the chart to hide all series.
http://jsfiddle.net/jlbriggs/57SR9/21/
Upvotes: 0