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 plot data without using plotly_click

Hello,

Is possible to access plot data without use the plotly_click event?

I want to access from an external function in order to add new data, so i need the x axis array.

Thanks in advance.

Something like:

var gd = document.getElementById('id of your graph div')

gd.data[0].x
// => returns the x array of the first trace

Hi Ettiene,

Yes and I must apologice because the way to access is at the beggining of the documentation… I ussually scroll down without look at it.

I tried to delete my post but i didnt see how.

Sorry and thanks for the response.

Don’t worry about it. Thanks for using plotly.js!