How to check and unmark all legend elements in the LineHart HighCharts line?

I want to configure the check and uncheck items immediately, I don’t understand, can we do this? let me know how to do it ..

+4
source share
2 answers

This is an example that does this, as well as many other things with legend elements and flags using a number of external controls:

http://jsfiddle.net/simo/57SR9/94/

:

$('#checkAll').click(function(){ for(i=0; i < chart.series.length; i++) { if(chart.series[i].selected == false){ chart.series[i].select(); showSeries.call(chart.series[i], {checked: true}); } } }); 
+14
source

You can use something like this:

  var legendLeft = $j('<div>') .css({ width: 160, maxHeight: 210, padding: 10, position: 'absolute', overflow: 'auto', right: 500, top: 380, borderRadius: options.borderRadius }) .appendTo(chart.container); var legendRight = $j('<div>') .css({ width: 260, maxHeight: 210, padding: 10, position: 'absolute', overflow: 'auto', right: 165, top: 383, borderRadius: options.borderRadius }).appendTo(chart.container); 

Note this: http://highslide.com/forum/viewtopic.php?f=9&t=15782

Example 1: http://jsfiddle.net/Fusher/ArmRM/14587/

Example 2: http://jsfiddle.net/hfrntt/EQGWV/

-1
source

Source: https://habr.com/ru/post/1478973/


All Articles