Toggle Stackgroups in line graph

Hello,

I’m trying to create a button to disable stacking in a line chart and a second button to enable the old stacking behaviour again. I’m definitely interested in the stacking itself, not just the fill.

The problem is that only some of the entries have stackgroups and others don’t and I need to re-enable the correct groups afterwards.

I haven’t found a way to adjust stackgroups directly and I haven’t seen a way to disable stacking altogether in the API.

I would be very happy over any help you guys can give me.

Thanks,
Emanuel