Skip to content

Extra hover text not work in Candlestick charts #2481

Description

@Yevgnen

Example:

#!/usr/bin/env python3# -*- coding: utf-8 -*-importnumpyasnpimportpandasaspdimportplotly.graph_objsasgoimportplotly.offlineaspyimportdatetimen=20open=2+np.abs(np.random.randn(n))
high=open+1low=open-1close=open+np.random.randn(n)
df=pd.DataFrame(
{
'open': open,
'high': high,
'low': low,
'close': close
},
index=pd.date_range(
'2010-01-01',
pd.to_datetime('2010-01-01') +datetime.timedelta(days=n-1)))
hovertext= []
foriinrange(len(df.open)):
hovertext.append('Point'+str(i))
trace=go.Candlestick(
x=df.index,
open=df.open,
high=df.high,
low=df.low,
close=df.close,
text=hovertext,
hoverinfo='all')
data= [trace]
py.plot(data, filename='ohlc_custom_hover.html')

However, turning the line trace = go.Candlestick( to trace = go.Ohlc( works just fine.

The plotly version is 2.2.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions