I’m trying to get the trace legend, when click on the plot using js.
I can get the x, y value using the following code, how do i get the legend from data? i’v tried to use data.name, data.points.name but none of them are working. Does any one know if it’s possible to do it and how to do it?
xVal = data.points.x ;
Thanks in advance!