toggle legend box
if you can add a button which allows user to toggle the legend the it will be great, because as of now if you are displaying the legend on chart area then some part of chart points get hidden because of legend, and user just cant see them because legend box is on top of the chart points.
I even tried to do a normal toggle action with help of jquery but there are some issues when we do it. e.g. if we hide the legend and then add some series dynamically to chart then series gets added properly but the legend dsnt get updated with new series. :(
Toggling of legend could be done through the chart update function.
Demo: http://jsfiddle.net/BlackLabel/rajfngyo/
More about the chart update function:
https://api.highcharts.com/class-reference/Highcharts.Chart#update
-
dimi commented
I find that Torstein's solution works. I would just suggest to add
this.options.enabled = true/false
as appropriate to ensure that the navigator position is adjusted correctly with Highstock.
Alsothis.nav.hide()/show()
for paging, if applicable.
-
Boris Kozorovitzky commented
I would like to see that feature too. See http://stackoverflow.com/questions/26328104/make-the-legend-disappear-in-highcharts
-
Richard Rice commented
Can the legend be movable as well as hidden?
-
Cédric commented
Could you send the full code?
I couldn't get it to work -
abaam commented
$("#container .highcharts-legend").show() //or hide();