# WebIO / PlotlyJS click event coordinates

**URL:** <https://discourse.julialang.org/t/webio-plotlyjs-click-event-coordinates/22471>\
**Category:** General Usage\
**Created:** [March 28, 2019, 6:00pm UTC](https://discourse.julialang.org/t/webio-plotlyjs-click-event-coordinates/22471 "2019-03-28T18:00:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rand5](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rand5/32/867_2.png) [@rand5](https://discourse.julialang.org/u/rand5)\
**Post date:** [March 28, 2019, 6:00pm UTC](https://discourse.julialang.org/t/webio-plotlyjs-click-event-coordinates/22471/1 "2019-03-28T18:00:31Z")

</div>

I need to get the x,y coordinates of the cursor during a click event.

The following example returns the location of the nearest point (based on the x-coordinates), so it must be using the cursor location somewhere, but I don’t see a good way to grab it.

```julia
using PlotlyJS
using WebIO

P = plot(rand(10, 4))
on(P["click"]) do data
    println(data)
end

```
