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

**URL:** <https://community.plotly.com/t/clicking-on-a-dash-graph-and-revealing-a-sidebar-to-edit-properties/86149>\
**Category:** Dash Python\
**Created:** [July 26, 2024, 5:19pm UTC](https://community.plotly.com/t/clicking-on-a-dash-graph-and-revealing-a-sidebar-to-edit-properties/86149 "2024-07-26T17:19:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MatthewWaller](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@MatthewWaller](https://community.plotly.com/u/MatthewWaller)\
**Post date:** [July 26, 2024, 5:19pm UTC](https://community.plotly.com/t/clicking-on-a-dash-graph-and-revealing-a-sidebar-to-edit-properties/86149/1 "2024-07-26T17:19:36Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![mo.elauzei](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/mo.elauzei/32/22101_2.png) [@mo.elauzei](https://community.plotly.com/u/mo.elauzei)\
**Post date:** [July 26, 2024, 5:38pm UTC](https://community.plotly.com/t/clicking-on-a-dash-graph-and-revealing-a-sidebar-to-edit-properties/86149/2 "2024-07-26T17:38:08Z")

</div>

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.

> **[Advanced Callbacks | Dash for Python Documentation | Plotly](https://dash.plotly.com/advanced-callbacks#determining-which-input-has-fired-with-dash.callback_context)**
>
> Now that you've gotten through the basics, explore some other things you can do with callbacks - from performance improvements to callback contexts.

---

<div class="post-metadata">

**Author:** ![MatthewWaller](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@MatthewWaller](https://community.plotly.com/u/MatthewWaller)\
**Post date:** [July 26, 2024, 6:02pm UTC](https://community.plotly.com/t/clicking-on-a-dash-graph-and-revealing-a-sidebar-to-edit-properties/86149/3 "2024-07-26T18:02:25Z")

</div>

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.
