Skip to content

Commit 4e76f58

Browse files
committed
Limit offsetgroup to Histogram and Bar traces
1 parent b127443 commit 4e76f58

File tree

1 file changed

+2
-2
lines changed
  • packages/python/plotly/plotly/express

1 file changed

+2
-2
lines changed

packages/python/plotly/plotly/express/_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,8 +2196,8 @@ def make_figure(args, constructor, trace_patch=None, layout_patch=None):
21962196
)
21972197
# Set 'offsetgroup' only in group barmode
21982198
if (
2199-
trace_spec.constructor in [go.Bar, go.Violin, go.Box, go.Histogram]
2200-
and args["barmode"] == "group"
2199+
trace_spec.constructor in [go.Bar, go.Histogram]
2200+
and args.get("barmode") == "group"
22012201
):
22022202
trace.update(alignmentgroup=True, offsetgroup=trace_name)
22032203
trace_names.add(trace_name)

0 commit comments

Comments
 (0)