Reputation: 39
I have a plotly scatter plot with hover text for each point. The hover function works if I plot in circle, otherwise the hover function is not working. (for example if I plot in square, the hover text is not showing)
received error message from browser: Uncaught TypeError: Cannot read property ....... at Object.hoverPoints
Upvotes: 0
Views: 643
Reputation: 1052
Don't really know, what you're doing wrong here, but it works for me as expected:
Code:
import plotly.plotly as py
import plotly.graph_objs as go
import plotly.offline as pyo
# Create random data with numpy
import numpy as np
N = 1000
random_x = np.random.randn(N)
random_y = np.random.randn(N)
# Create a trace
trace = go.Scatter(
x = random_x,
y = random_y,
mode = 'markers',
marker = ({'symbol':'triangle-left'})
)
data = [trace]
pyo.plot(data)
Reference to marker styling
https://plot.ly/python/reference/#scatter-marker-symbol
Upvotes: 1