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

Skip to content

Commit c1e9bd2

Browse files
committed
fixes plotly#805
1 parent 4d96cff commit c1e9bd2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

plotly/figure_factory/_dendrogram.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ def create_dendrogram(X, orientation="bottom", labels=None,
8787
dendrogram = _Dendrogram(X, orientation, labels, colorscale,
8888
distfun=distfun, linkagefun=linkagefun)
8989

90-
return {'layout': dendrogram.layout,
91-
'data': dendrogram.data}
90+
return graph_objs.Figure(data=dendrogram.data, layout=dendrogram.layout)
9291

9392

9493
class _Dendrogram(object):

plotly/figure_factory/_gantt.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from plotly import exceptions, optional_imports
66
from plotly.figure_factory import utils
7+
from plotly.graph_objs import graph_objs
78

89
pd = optional_imports.get_module('pandas')
910

@@ -170,7 +171,7 @@ def gantt(chart, colors, title, bar_width, showgrid_x, showgrid_y, height,
170171
)
171172
layout['shapes'] = tasks
172173

173-
fig = dict(data=data, layout=layout)
174+
fig = graph_objs.Figure(data=data, layout=layout)
174175
return fig
175176

176177

0 commit comments

Comments
 (0)