Skip to content

Request adding customer hover for gantt plot #913

@zeruitle

Description

@zeruitle

Hi all

Is it possible to add customer hover for gantt plot?

like this:
dict(Task='Evening Sleep', Start=start, Finish=end, Resource='Sleep', Text = 'my hover1' )

so when my mouse hover this gantt block, the hover information is what I put in Text

import plotly
import plotly.figure_factory as ff

df = [
    dict(Task='Evening Sleep', Start=start, Finish=end, Resource='Sleep', Text = 'my hover1' ),
    dict(Task='Morning Sleep', Start=start Finish=end, Resource='Sleep',Text = 'my hover1')
]

colors = dict(Cardio = 'rgb(46, 137, 205)',
              Food = 'rgb(114, 44, 121)',
              Sleep = 'rgb(198, 47, 105)')

fig = ff.create_gantt(df, colors=colors, index_col='Resource', title='Daily Schedule',
                      show_colorbar=True, bar_width=0.8, showgrid_x=True, showgrid_y=True, group_tasks=True)
plotly.offline.plot(fig, filename='gantt-hours-minutes.html')

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions