Posted 20 December 2023, 1:49 pm EST - Updated 20 December 2023, 1:55 pm EST
FlexChart is always stacked
Posted by: dung.itcdt on 20 December 2023, 1:49 pm EST
-
-
Posted 20 December 2023, 11:14 pm EST
Hello,
By default, the columns in FlexChart are not stacked. There can be one of the following two scenarios:
First, when you have set the “Stacking” property of the FlexChart to ‘C1.Chart.Stacking.Stacked’ as follows:
flexChart1.Stacking = C1.Chart.Stacking.Stacked;
Second, when you have assigned different y-axes to each of the column series as follows:
//column series var rightAxis = new Axis() { Position = C1.Chart.Position.Right }; flexChart1.Series.Add(new Series() { Name = "1", Binding = "Y3", AxisY = rightAxis }); flexChart1.Series.Add(new Series() { Name = "2", Binding = "Y4", AxisY = new Axis() { Position = C1.Chart.Position.Right, AxisLine = false, Labels = false, TickLength = 0 } });
Resolution:
Set the “Stacking” property to ‘C1.Chart.Stacking.None’ (default value) as follows:
flexChart1.Stacking = C1.Chart.Stacking.None;
Use the same y-axes for each column series you want to show in the same chart area, as follows:
//column series var rightAxis = new Axis() { Position = C1.Chart.Position.Right }; flexChart1.Series.Add(new Series() { Name = "1", Binding = "Y3", AxisY = rightAxis }); flexChart1.Series.Add(new Series() { Name = "2", Binding = "Y4", AxisY = rightAxis });
For more info on column stacking, please refer to “WinForms Bar and Column Charts”(https://developer.mescius.com/componentone/docs/win/online-flexchart/bar-chart.html) in the docs.
Please refer to the attached sample for the second scenario. (see FlexChart48_StackedCharts.zip)
If this is not how you are implementing things or you have a different scenario, please revert back with the steps to replicate the behavior.
If possible, could you please attach a stripped-down sample of your project or update the attached sample to replicate the behavior so that we can assist you in the best way possible?Regards,
Uttkarsh.