Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Gantt Charts - Isolate Rows


I would like to know how to modify the gantt chart examples of the documentation page ‘’ in that way that double clicking on the legend entries will isolate the corresponding rows.

In the following example (expl no. 5 of the documentation page) I would like row ‘Job A’ to be isolated when I click on the legend entry ‘Apple’.
Here is the code:

import plotly.plotly as py
import plotly.figure_factory as ff

df = [dict(Task="Job A", Start='2016-01-01', Finish='2016-01-02', Resource='Apple'),
      dict(Task="Job B", Start='2016-01-02', Finish='2016-01-04', Resource='Grape'),
      dict(Task="Job C", Start='2016-01-02', Finish='2016-01-03', Resource='Banana')]

colors = dict(Apple = 'rgb(220, 0, 0)',
              Grape = 'rgb(170, 14, 200)',
              Banana = (1, 0.9, 0.16))

fig = ff.create_gantt(df, colors=colors, index_col='Resource', show_colorbar=True)
py.iplot(fig, filename='gantt-dictioanry-colors', world_readable=True)

Does anybody have an idea?