# Determine clicked trace in stacked bar chart

**URL:** <https://community.plotly.com/t/determine-clicked-trace-in-stacked-bar-chart/2186>\
**Category:** plotly.js\
**Created:** [September 23, 2016, 4:45pm UTC](https://community.plotly.com/t/determine-clicked-trace-in-stacked-bar-chart/2186 "2016-09-23T16:45:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eagor](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/eagor/32/424_2.png) [@eagor](https://community.plotly.com/u/eagor)\
**Post date:** [September 23, 2016, 4:45pm UTC](https://community.plotly.com/t/determine-clicked-trace-in-stacked-bar-chart/2186/1 "2016-09-23T16:45:50Z")

</div>

Is it possible to determine, which part of stacked bar was clicked (ie, know the trace for the that part)?

For example, in this [example](http://codepen.io/eagor/pen/VKpajj) how do I know if LA or SF Zoo was clicked? The plotly\_click handler passes all traces under .points property, without obvious hint to the one was clicked.

Or is there a way to get the click coordinates, so that I could use axis scales to calculate the trace that is positioned there?

---

<div class="post-metadata">

**Author:** ![etienne](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/etienne/32/17_2.png) [@etienne](https://community.plotly.com/u/etienne)\
**Post date:** [September 26, 2016, 1:19pm UTC](https://community.plotly.com/t/determine-clicked-trace-in-stacked-bar-chart/2186/2 "2016-09-26T13:19:59Z")

</div>

It is not possible at the moment.

Please subscribe to [https://github.com/plotly/plotly.js/issues/965](https://github.com/plotly/plotly.js/issues/965) for the latest development info.
