Setting individual bar chart catagory data on x-axis

How Do I set individual bar chart catagory data on x-axis via .net.



Please see attachment to see an example done in Excel.

Hi,

Thanks for your posting and using Aspose.Cells.

Please use Chart.NSeries.CategoryData property for your needs. Please see the following sample code. I have attached the source excel file used in this code and output excel file generated by it for your reference.

C#


string filePath = @“D:\Downloads\source1.xlsx”;


Workbook wb = new Workbook(filePath);


Worksheet ws = wb.Worksheets[0];


Chart ch = ws.Charts[0];

ch.NSeries.CategoryData = “{test,test,test again}”;


wb.Save(“output.xlsx”);