Hi! I'm drawing a stacked bar chart using some sample data:
return [
{ location: "East",
amplitude: 4000,
category: "first"
},
{ location: "West",
amplitude: 300,
category: "first"
},
{ location: "East",
amplitude: 400,
category: "second"
},
{ location: "West",
amplitude: 3000,
category: "second"
}
]
I use one series which I group by 'category':
Which produces the following chart:
Now I'd like to change the order of the categories, to instead be this:
The way I got to this was to split up into two series and filter by the group, like this:
Is there a way of reordering groups without splitting them into different series in a stacked bar chart? I'd like the simplicity of the first approach (using Group By to represent different groups) with the outcome of the second (ability to reorder by splitting groups into different series).
Thanks!