How can I select multiple point or marker programmatically like Shift + Click on chart in default case of Highcharts?
You can select several points programatically using the Point.select function with accumulate set to true. The function signature is (API):
select ([Boolean select], [Boolean accumulate])
select: Boolean. Whentrue, the point is selected. Whenfalse, the point is unselected. Whennullorundefined, the selection state is toggled.
accumulate: Boolean. Whentrue, the selection is added to other selected points. Whenfalse, other selected points are deselected. Internally in Highcharts,selected points are accumulated on Control, Shift or Cmd clicking the point.
A example of your code would be:
chart.series[0].data[0].select(true, true);
chart.series[0].data[1].select(true, true);
// ...
See this JSFiddle demonstration of how it can select several points.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With