Thank you for writing.
To achieve the desired layout first you should set the series CombineMode
property to Stack
. Then you can use the StackGroupKey
property to control how the series are stacked. For example when you have four series you can combine them like this:
barSeries.CombineMode = ChartSeriesCombineMode.Stack;
barSeries2.CombineMode = ChartSeriesCombineMode.Stack;
barSeries3.CombineMode = ChartSeriesCombineMode.Stack;
barSeries4.CombineMode = ChartSeriesCombineMode.Stack;
barSeries.StackGroupKey = 0;
barSeries2.StackGroupKey = 0;
barSeries3.StackGroupKey = 1;
barSeries4.StackGroupKey = 1;
I hope this information helps. Should you have any other questions, I will be glad to assist you.