How to set category axis
Contents
[
Hide
]
Possible Usage Scenarios
After you create a chart in a worksheet, then you can set category axis for it. In this article, we will show you how to set category axis for Excel chart, using Aspose.Cells with sample code.
The steps in sample code
-
Create a new workbook.
-
Create a new chart in the first worksheet.
-
Add some values to cells in the first worksheet.
-
Now you can set the category axis, there are two ways: using cell data, or using strings directly, both of which are shown in the sample code.
-
Set value axis, save the workbook to view the result.
The following sample code generates the output Excel file.
Sample Code