Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I hide series from a HighCharts legend?

I have 4 series in my chart. 2 are visible when the chart loads. 2 are hidden.

When the user zooms in, the visibility switches.

How can I have a legend that only displays the 2 visible series?

like image 991
Z Jones Avatar asked Jul 21 '11 18:07

Z Jones


People also ask

Is it possible to pass multiple series in a chart in highcharts?

Yes, you can. You could add more. If you get stack with implementing your project, please send us a minimal, verifiable demo in JSFiddle, so we could help you out with your code.

How do I hide the Highchart watermark?

Highchart by default puts a credits label in the lower right corner of the chart. This can be removed using credits option in your chart settings. will remove the highcharts.com logo.

What is Highchart legend?

The legend is a box containing a symbol and name for each series item or point item in the chart. Each series (or points in case of pie charts) is represented by a symbol and its name in the legend. It is possible to override the symbol creator function and create custom legend symbols.

How do I disable highcharts credits?

credits: { enabled: false }, that will remove the "Highcharts.com" text from the bottom of the chart. @philfreo 'Credits: false' could produce a undefined error if highcharts didn't do proper checking.


1 Answers

Pass showInLegend parameter to series you don't want to be visible in legend like:

series.showInLegend = false; 
like image 56
Igor Dymov Avatar answered Sep 27 '22 20:09

Igor Dymov