# Plotly js click detection

**URL:** <https://community.plotly.com/t/plotly-js-click-detection/2708>\
**Category:** plotly.js\
**Created:** [November 17, 2016, 2:46pm UTC](https://community.plotly.com/t/plotly-js-click-detection/2708 "2016-11-17T14:46:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmosteit](https://avatars.discourse-cdn.com/v4/letter/m/6bbea6/32.png) [@mmosteit](https://community.plotly.com/u/mmosteit)\
**Post date:** [November 17, 2016, 2:46pm UTC](https://community.plotly.com/t/plotly-js-click-detection/2708/1 "2016-11-17T14:46:03Z")

</div>

I am writing an application using plotlyjs. The click handler works fine for when a user clicks on a point. However, I need the ability to detect clicks on arbitrary locations on the plot (i.e. close to but not exactly on a point). Doing this currently does not seem to fire a click event. Is there a way to do this?

If it makes any difference. I am using an angularjs plugin for plotlyjs.

Thanks

---

<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:** [November 17, 2016, 5:21pm UTC](https://community.plotly.com/t/plotly-js-click-detection/2708/2 "2016-11-17T17:21:01Z")

</div>

There’s no easy way to do this unfortunately.

But, here are a few possible solutions:

- [https://github.com/plotly/plotly.js/issues/965](https://github.com/plotly/plotly.js/issues/965)
- [Getting the actual coordinates of a 'plotly\_click'?](https://community.plotly.com/t/getting-the-actual-coordinates-of-a-plotly-click/1759)
- [Add functionality](https://community.plotly.com/t/add-functionality/971/18)
- [http://codepen.io/etpinard/pen/ZWwqoy?editors=0010](http://codepen.io/etpinard/pen/ZWwqoy?editors=0010)
