✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚾️ It's finally Baseball season! Root for the home team... & Register for our Sports Analytics Webinar!

Get&Set on selected traces

I want to allow my users to save their selection of visible traces. How can I access this information & is it possible to initialize the chart in this way?

they press a save button somewhere --> next time they open the page, chart is shown with only trace0 selected

Yes, we store that info on your graph’s div element:

var gd = document.getElementById('graph')

var traceVisibility = gd.data.map(trace => trace.visible);