How to set category axis

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

  1. Create a new workbook.

  2. Create a new chart in the first worksheet.

  3. Add some values to cells in the first worksheet.

  4. 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.

  5. Set value axis, save the workbook to view the result.

Sample Code