Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Accessing x/y values in eventData for 3d Surface when hoverinfo set to 'text'

I am using a REST+Hypermedia API that returns 3d surface z-data with linked URIs for fetching companion data. I store the z-data and the URIs in separate but parallel structures so if I had the x/y coords from a data point, I could look up the URI and fetch the additional data to display in an annotation.

My issue is that I have to set hoverinfo: 'text' in the trace which prevents the x/y values from being written to eventData. Is there anyway to access the x/y values in eventData with this config setup? eventData.points[0].pointNumber looks promising but I can’t figure out what it refers to.

Here is a Codepen with what I’m trying to do: http://codepen.io/travismccauley/pen/vyjKZY?editors=1111

The questions are in comments in the click handler.

I’m really loving Plotly but stuck on this. What am I not seeing?

Thanks,
Travis

Sorry, I have no idea to help u, but I found a little mistake in your code that could confuse others: Your hover-event named also “plotly_click” and should named “plotly_hover”:

myPlot.on('plotly_hover', function(data) {

Thanks, Phil. I did mean for it be a click. But you’re right the 2 click handlers are confusing. I’ve changed it.