Skip to content

Commit c444518

Browse files
force the template via override
1 parent ae14231 commit c444518

File tree

1 file changed

+3
-1
lines changed
  • packages/python/plotly/plotly/express

1 file changed

+3
-1
lines changed

Diff for: packages/python/plotly/plotly/express/_core.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,7 @@ def make_figure(args, constructor, trace_patch={}, layout_patch={}):
12581258
cmax=range_color[1],
12591259
colorbar=dict(title=get_decorated_label(args, args[colorvar], colorvar)),
12601260
)
1261-
for v in ["title", "height", "width", "template"]:
1261+
for v in ["title", "height", "width"]:
12621262
if args[v]:
12631263
layout_patch[v] = args[v]
12641264
layout_patch["legend"] = {"tracegroupgap": 0}
@@ -1293,6 +1293,8 @@ def make_figure(args, constructor, trace_patch={}, layout_patch={}):
12931293
# Add traces, layout and frames to figure
12941294
fig.add_traces(frame_list[0]["data"] if len(frame_list) > 0 else [])
12951295
fig.layout.update(layout_patch)
1296+
if "template" in args and args["template"] is not None:
1297+
fig.update_layout(template=args["template"], overwrite=True)
12961298
fig.frames = frame_list if len(frames) > 1 else []
12971299

12981300
fig._px_trendlines = pd.DataFrame(trendline_rows)

0 commit comments

Comments
 (0)