We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set position for multiple charts in a single sheet and how to display label names?

Platform: WinForms |
Control: XlsIO |
Published Date: April 30, 2011 |
Last Revised Date: December 4, 2019

In XlsIO you can create multiple charts and set the chart position. The IChartShape interface has four properties "TopRow", "BottomRow","LeftColumn, "RighColumn". You should set all the four positions to display the chart. By using Category Labels property you can display the serie names.


IChart Chart1 = sheet.Charts.Add();
Chart1.ChartType = ExcelChartType.Bar_Clustered;
Chart1.IsSeriesInRows = false;
Chart1.DataRange = sheet.Range["B2:B12"];
Chart1.HasLegend = false;
IChartSerie serieOne = Chart1.Series[0];
serieOne.Name = "Austin";
 //Category Labels
serieOne.CategoryLabels = sheet.Range["A3:A12"];
IChartShape shape1 = Chart1 as IChartShape;
shape1.TopRow = 13;
shape1.LeftColumn = 2;
shape1.RightColumn = 14;
shape1.BottomRow = 35;



Dim Chart1 As IChart = sheet.Charts.Add()
Chart1.ChartType = ExcelChartType.Bar_Clustered
Chart1.IsSeriesInRows = False
Chart1.DataRange = sheet.Range("B2:B12")
Chart1.HasLegend = False
Dim serieOne As IChartSerie = Chart1.Series(0)
serieOne.Name = "Austin"
''Category Labels
serieOne.CategoryLabels = sheet.Range("A3:A12")
Dim shape1 As IChartShape = TryCast(Chart1, IChartShape)
shape1.TopRow = 13
shape1.LeftColumn = 2
shape1.RightColumn = 14
shape1.BottomRow = 35


Here is the sample for your reference:



2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile