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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set horizontal axis label is not set

Thread ID:

Created:

Updated:

Platform:

Replies:

125758 Sep 9,2016 11:05 AM UTC Sep 12,2016 12:18 PM UTC UWP 1
loading
Tags: XlsIO
Sharad Kumar
Asked On September 9, 2016 11:05 AM UTC

Hi,

How to set horizontal axis label for chart in Excel file.

I am using following code.

ExcelEngine oengine = new ExcelEngine();
IApplication oApp = oengine.Excel;
oApp.DefaultVersion = ExcelVersion.Excel2007;
IWorkbook oWorkbook  =  oApp.Workbooks.Create(1);
IWorksheets osheets = oWorkbook.Worksheets;
IWorksheet  osheet = osheets .Worksheets[0];

object[] Xvalues = new object[] {"=Sheet1!$A$1:$A$10"}
IChart ochart = oshhet.Charts.Add();
IChartSerie oserie = ochart.Series.Add(ExcelchartType ......);
oserie.EnteredDirectlyCategoryLabel = Xvalues;

My horizontal label value is not set with column range value .
Excel file is attach with mail.

Thanks
sharad kumar

Attachment: New_folder_(6)_8ba28a11.rar

Sridhar Sukumar [Syncfusion]
Replied On September 12, 2016 12:18 PM UTC

Hi Sharad, 
 
Thank you for contacting Syncfusion support. 
 
EnteredDirectlyCategoryLabel property is used to set string value to the chart series category labels. If you want to set the range value to category label, then kindly use the following code example. 
 
Code example: 
chart.Series[0].CategoryLabels = worksheet.Range["A1:A10"]; 
 
We have prepared a sample for your requirement which can be downloaded from the following link 
 
 
 
Please let us know if you have any concerns on this. 
 
Regards. 
Sridhar S 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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

;