Cannot Find Clustered Column and ColumnStacked Display Wrongly

I am using ASPOSE.CELL to display charts. First, I cannot find clustered column as it is in Excel so I opted to used ColumnStacked which is displaying the wrong chart as Shown in the image below.

Its is displaying Chart B but I want Chart A. How Can I display Chart A
image.png (23.1 KB)
Kindly Help Here

You can implement it like this:

Workbook workbook = new Workbook("yourExcel.xlsx");
ChartCollection charts = workbook.Worksheets[0].Charts;
int index = charts.Add(ChartType.Column, "=Sheet1!A1:E7", true, 5, 6, 25, 16);
Chart chart = charts[index];
chart.Legend.Position = LegendPositionType.Bottom;
chart.Title.Text = "Chart A";

Hope helps a bit.

This gives me an error
Add(ChartType.Column, "=Sheet1!A1:E7", true, 10, 1, 30, 10)

Cannot support all of this parameters being passed.

Please run the code we provided based on this file.input.7z (5.8 KB)
which works fine in our side(version 23.2), if you still have any questions, please let us know.


From your Idea I have managed to apply it like this

chart.SetChartDataRange("A1:E7", true);

Now I am sorted and worked well

I’m glad your issue has been solved. If you have any questions, please feel free to contact us.