I am plotting a tdms data as line graph with multiple lines on a plot. How do I preserve the state of toggled lines

I plotted the graph. I want to keep the state saved even if I refresh and come back to the webpage