Learn how to use Dash Bio for next-gen sequencing & quality control. 🧬Register for the Oct 27 webinar.

Referencing/Updating Trace by Curve Number

I am writing a dashboard with several traces of different kinds in different subplots. I am trying to change the color of the trace that the user clicks on. I am using a callback that gets clickData from the figure component, and I can access the curveNumber. I am able to reference the current color like so app.layout['algorithm-output'].figure['data'][click_data['points'][0].get('curveNumber')]['line']['color'] where 'algorithm-output’ is the id of the graph component that I am modifying. However, I’m sure how I can use this number (or any of the other values that come with the clickData property) to update the trace in a new figure that I can return to the Output() in the callback decorator. What is the best way of going about doing this?