Skip to content

Commit e6aa0e4

Browse files
committed
trace attempts
1 parent abff982 commit e6aa0e4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

plotly/tools.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,6 +1775,7 @@ def _gantt_dict(chart, colors, title, index_col, show_colorbar, bar_width,
17751775
"""
17761776
Refer to FigureFactory.create_gantt() for docstring
17771777
"""
1778+
from plotly.graph_objs import graph_objs
17781779
if tasks is None:
17791780
tasks = []
17801781
if task_names is None:
@@ -1834,6 +1835,22 @@ def _gantt_dict(chart, colors, title, index_col, show_colorbar, bar_width,
18341835
)
18351836
)
18361837

1838+
if show_colorbar is True:
1839+
# generate dummy data for colorscale visibility
1840+
trace2 = dict(
1841+
#x=[tasks[0]['x0'], tasks[0]['x0']],
1842+
x=[2, 6],
1843+
y=[4, 2],
1844+
name='asdf',
1845+
visible='legendonly',
1846+
marker=dict(
1847+
size=10,
1848+
color='rgb(25, 50, 150)'),
1849+
showlegend=True
1850+
)
1851+
1852+
data.append(trace2)
1853+
18371854
layout = dict(
18381855
title=title,
18391856
showlegend=False,

0 commit comments

Comments
 (0)