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!