Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a7be116

Browse files
committed
Fixed formatting
1 parent 0ab3ad1 commit a7be116

File tree

1 file changed

+50
-29
lines changed

1 file changed

+50
-29
lines changed

plotly/tests/test_optional/test_figure_factory.py

Lines changed: 50 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,36 +1286,57 @@ def test_df_dataframe_all_args(self):
12861286
test_gantt_chart = tls.FigureFactory.create_gantt(df)
12871287

12881288
exp_gantt_chart = {
1289-
12901289
'data': [{'marker': {'color': 'white'},
1291-
'name': '',
1292-
'x': ['2009-01-01', '2009-02-30'],
1293-
'y': [0, 0]}],
1294-
'layout': {'height': 600,
1295-
'hovermode': 'closest',
1296-
'shapes': [{'opacity': 1, 'y1': 0.2, 'xref': 'x', 'fillcolor': 'rgb(31.0, 119.0, 180.0)', 'yref': 'y', 'y0': -0.2, 'x0': '2009-01-01', 'x1': '2009-02-30', 'type': 'rect', 'line': {'width': 0}}, {'opacity': 1, 'y1': 1.2, 'xref': 'x', 'fillcolor': 'rgb(255.0, 127.0, 14.0)', 'yref': 'y', 'y0': 0.8, 'x0': '2009-03-05', 'x1': '2009-04-15', 'type': 'rect', 'line': {'width': 0}}],
1297-
'showlegend': False,
1298-
'title': 'Gantt Chart',
1299-
'width': 900,
1300-
'xaxis': {'rangeselector': {'buttons': [{'count': 7,
1301-
'label': '1w',
1302-
'step': 'day',
1303-
'stepmode': 'backward'},
1304-
{'count': 1, 'label': '1m', 'step': 'month', 'stepmode': 'backward'},
1305-
{'count': 6, 'label': '6m', 'step': 'month', 'stepmode': 'backward'},
1306-
{'count': 1, 'label': 'YTD', 'step': 'year', 'stepmode': 'todate'},
1307-
{'count': 1, 'label': '1y', 'step': 'year', 'stepmode': 'backward'},
1308-
{'step': 'all'}]},
1309-
'showgrid': False,
1310-
'type': 'date',
1311-
'zeroline': False},
1312-
'yaxis': {'autorange': False,
1313-
'range': [-1, 3],
1314-
'showgrid': False,
1315-
'ticktext': ['Job A', 'Job B'],
1316-
'tickvals': [0, 1],
1317-
'zeroline': False}}
1318-
1290+
'name': '',
1291+
'x': ['2009-01-01', '2009-02-30'],
1292+
'y': [0, 0]}],
1293+
'layout': {'height': 600,
1294+
'hovermode': 'closest',
1295+
'shapes': [{'opacity': 1,
1296+
'y1': 0.2,
1297+
'xref': 'x',
1298+
'fillcolor': 'rgb(31.0, 119.0, 180.0)',
1299+
'yref': 'y',
1300+
'y0': -0.2,
1301+
'x0': '2009-01-01',
1302+
'x1': '2009-02-30',
1303+
'type': 'rect',
1304+
'line': {'width': 0}},
1305+
{'opacity': 1,
1306+
'y1': 1.2,
1307+
'xref': 'x',
1308+
'fillcolor': 'rgb(255.0, 127.0, 14.0)',
1309+
'yref': 'y',
1310+
'y0': 0.8,
1311+
'x0': '2009-03-05',
1312+
'x1': '2009-04-15',
1313+
'type': 'rect',
1314+
'line': {'width': 0}}],
1315+
'showlegend': False,
1316+
'title': 'Gantt Chart',
1317+
'width': 900,
1318+
'xaxis': {'rangeselector': {'buttons': [
1319+
{'count': 7, 'label': '1w',
1320+
'step': 'day', 'stepmode': 'backward'},
1321+
{'count': 1, 'label': '1m',
1322+
'step': 'month', 'stepmode': 'backward'},
1323+
{'count': 6, 'label': '6m',
1324+
'step': 'month', 'stepmode': 'backward'},
1325+
{'count': 1, 'label': 'YTD',
1326+
'step': 'year', 'stepmode': 'todate'},
1327+
{'count': 1, 'label': '1y',
1328+
'step': 'year', 'stepmode': 'backward'},
1329+
{'step': 'all'}
1330+
]},
1331+
'showgrid': False,
1332+
'type': 'date',
1333+
'zeroline': False},
1334+
'yaxis': {'autorange': False,
1335+
'range': [-1, 3],
1336+
'showgrid': False,
1337+
'ticktext': ['Job A', 'Job B'],
1338+
'tickvals': [0, 1],
1339+
'zeroline': False}}
13191340
}
13201341

13211342
self.assertEqual(test_gantt_chart['data'][0],

0 commit comments

Comments
 (0)