Skip to content

Commit 98bddc4

Browse files
committed
fixed last example in gantt string doc
1 parent cce50f9 commit 98bddc4

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

plotly/tools.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2100,18 +2100,10 @@ def create_gantt(df, colors=None, index_col=None, show_colorbar=False,
21002100
from plotly.tools import FigureFactory as FF
21012101
21022102
# Make data as a dataframe
2103-
df = [{'Task': 'Run',
2104-
'Start': '2010-01-01',
2105-
'Finish': '2011-02-02',
2106-
'Complete': 10},
2107-
{'Task': 'Fast',
2108-
'Start': '2011-01-01',
2109-
'Finish': '2012-06-05',
2110-
'Complete': 55},
2111-
{'Task': 'Eat',
2112-
'Start': '2012-01-05',
2113-
'Finish': '2013-07-05',
2114-
'Complete': 94}]
2103+
df = pd.DataFrame([['Run', '2010-01-01', '2011-02-02', 10],
2104+
['Fast', '2011-01-01', '2012-06-05', 55],
2105+
['Eat', '2012-01-05', '2013-07-05', 94]],
2106+
columns=['Task', 'Start', 'Finish', 'Complete'])
21152107
21162108
# Create a figure with Plotly colorscale
21172109
fig = FF.create_gantt(df, colors='Blues', index_col='Complete',

0 commit comments

Comments
 (0)