@@ -1139,8 +1139,13 @@ def pie(
1139
1139
"""
1140
1140
In a pie plot, each row of `data_frame` is represented as a sector of a pie.
1141
1141
"""
1142
+ if color_discrete_sequence is not None :
1143
+ layout_patch = {"piecolorway" : color_discrete_sequence }
1142
1144
return make_figure (
1143
- args = locals (), constructor = go .Pie , trace_patch = dict (showlegend = True , hole = hole )
1145
+ args = locals (),
1146
+ constructor = go .Pie ,
1147
+ trace_patch = dict (showlegend = True , hole = hole ),
1148
+ layout_patch = layout_patch ,
1144
1149
)
1145
1150
1146
1151
@@ -1184,10 +1189,13 @@ def sunburst(
1184
1189
A sunburst plot represents hierarchial data as sectors laid out over
1185
1190
several levels of concentric rings.
1186
1191
"""
1192
+ if color_discrete_sequence is not None :
1193
+ layout_patch = {"sunburstcolorway" : color_discrete_sequence }
1187
1194
return make_figure (
1188
1195
args = locals (),
1189
1196
constructor = go .Sunburst ,
1190
1197
trace_patch = dict (branchvalues = branchvalues , maxdepth = maxdepth ),
1198
+ layout_patch = layout_patch ,
1191
1199
)
1192
1200
1193
1201
@@ -1220,10 +1228,13 @@ def treemap(
1220
1228
"""
1221
1229
A treemap plot represents hierarchial data as nested rectangular sectors.
1222
1230
"""
1231
+ if color_discrete_sequence is not None :
1232
+ layout_patch = {"treemapcolorway" : color_discrete_sequence }
1223
1233
return make_figure (
1224
1234
args = locals (),
1225
1235
constructor = go .Treemap ,
1226
1236
trace_patch = dict (branchvalues = branchvalues , maxdepth = maxdepth ),
1237
+ layout_patch = layout_patch ,
1227
1238
)
1228
1239
1229
1240
0 commit comments