Clicking on a Dash graph and revealing a sidebar to edit properties

I would like to have a bunch of graphs on a window, and have controls for customizing them. However, instead of putting the controls inline or in a disclosure groups, I would like to be able to click on the graph itself, and have that open a sidebar with the the controls for customizing.

I can kind of do this if I put a button above the graph, and associate it with the graph. But is there a way to click on a portion of the graph itself, and have that trigger opening the sidebar, so that I don’t take up space with the extra button?

Thanks!

Hi @MatthewWaller

Have you tried using Callback Context? this is the easiest way to trigger a callback upon clicking on a Graph.

Also graphs have clickData property that could be used as a callback input.

1 Like

That’s a good callout. I’ve used the clickData property, but it only fires when I click on a datapoint in the graph.

Which is probably an indication that I’m going about this in the wrong way and should maybe make a custom modebar button.