If I use boxpoints='all'
then it seems like I should be able to hover over the points and see the text
for each point. Specifically in dash, that doesn’t seem to work.
Here’s an example:
import dash
import dash_html_components as html
import dash_core_components as dcc
from plotly.tools import make_subplots
import numpy as np
import pandas as pd
d1=pd.DataFrame(np.random.choice(list('ABC'),p=[.45,.45,.1],size=[100,5]))
d2=pd.DataFrame(np.random.normal(size=[100,5]))
data=[]
for i,x in d1.iteritems():
data.append(dict(y=d2[i],x=x,name=f'series {i}',text=[f'point {j}' for j in x.index],
boxpoints='all',hoverinfo='text+name',type='box'))
fig={'data':data,
'layout':{'hovermode':'closest','boxmode':'group'}}
app = dash.Dash()
app.layout = html.Div([
dcc.Graph(id='graph1',figure=fig)
]
)
app.server.run(port=5000,host='0.0.0.0')
If I create the same plot in the notebook it works the way I think it should – I can see individual hover text for ever point.
# create fig identically
iplot(fig)
I’m using
dash-core-components (0.15.0rc1)
dash (0.20.0)
plotly (2.4.1)