Skip to content

Commit

Permalink
Respect series order in stacked area plot (#5236)
Browse files Browse the repository at this point in the history
This is a quick fix of #5235, until a more thorough refactoring (if ever) as discussed there.
  • Loading branch information
stas-sl authored and jlstevens committed Apr 1, 2022
1 parent 3ded021 commit a26dcb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion holoviews/element/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def stack(cls, areas, baseline_name='Baseline'):
vdims = [vdim, baseline_name]
baseline = None
stacked = areas.clone(shared_data=False)
for key, sdf in df.groupby(level=levels):
for key, sdf in df.groupby(level=levels, sort=False):
sdf = sdf.droplevel(levels).reindex(index=df.index.unique(-1), fill_value=0)
if baseline is None:
sdf[baseline_name] = 0
Expand Down

0 comments on commit a26dcb1

Please sign in to comment.