N766338
Posts: 2
Joined: Wed Jan 12, 2022 11:39 pm

Data refresh redraws all the series that were filtered with legends

I am working in a web app that needs to keep the data series that were selected with the legends after there is a data refresh in the chart.

Any method to keep the same series selected after the data refresh?

Thank you.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Data refresh redraws all the series that were filtered with legends

Hi N766338,

Welcome to our forum and thanks for contacting us with your question!

First of all, please provide me with a simplified live demo with your chart. You can start here: https://jsfiddle.net/BlackLabel/g96kt8jo/24/

Apart from that I need some more details about the problem. Please explain what do you mean by data refresh? Do you use chart.redraw() method or something like that? Also, I need to know how do you select your data with a legend? By default you can use legend to either show or hide series. In general, I think that you would want to use mouseOver or legendItemClick events to save information about series and then apply it after refresh.

Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”