Update Chart Category Axis – Aspose.Cells Cloud API
This REST API updates a chart’s category axis.
PostChartCategoryAxis API
POST https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/charts/{chartIndex}/categoryaxis
Security and Authentication
The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.
Request parameters
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| name | string | path | Name of the Excel file. |
| sheetName | string | path | Name of the worksheet that contains the chart. |
| chartIndex | integer | path | Zero‑based index of the chart to be updated. |
| axis | object | body | JSON object that defines the category axis properties. |
| folder | string | query | Folder in cloud storage where the file is located (optional). |
| storageName | string | query | Name of the storage (optional). |
Request Body Schema – axis object
| Property | Type | Description |
|---|---|---|
| IsAutomaticMajorUnit | boolean | Determines whether the major unit is calculated automatically. |
| MajorUnit | number | Value of the major unit when IsAutomaticMajorUnit is false. |
| IsAutomaticMinorUnit | boolean | Determines whether the minor unit is calculated automatically. |
| MinorUnit | number | Value of the minor unit when IsAutomaticMinorUnit is false. |
| Title | object | Title settings for the axis (e.g., Text, Font, Visible). |
| TickLabelPosition | string | Position of tick labels (e.g., Low, High, NextToAxis). |
| … | … | Additional axis properties as defined in the API spec. |
HTTP Status Codes
| Code | Meaning | Description |
|---|---|---|
| 200 | OK | Filter applied successfully; response contains operation details. |
| 400 | Bad Request | Missing or invalid parameters (e.g., unsupported file type). |
| 401 | Unauthorized | Invalid or missing JWT token. |
| 413 | Payload Too Large | Uploaded file exceeds size limit. |
| 500 | Internal Server Error | Unexpected server error. |
Prerequisites / Authentication
To call this endpoint you must obtain a JWT access token from the Aspose.Cells Cloud authentication service (/connect/token). Include the token in the Authorization header as shown in the example below.
The OpenAPI Specification defines a publicly accessible programming interface and lets you carry out REST interactions directly from a web browser.
Notes
- The endpoint requires HTTPS; using HTTP may trigger mixed‑content warnings in browsers.
- All placeholder values (
{name},{sheetName},{chartIndex},{folder},{storageName}) must be replaced with actual identifiers. - Supported chart types for category‑axis updates are listed in the API reference.
Cloud SDK Family
Using an SDK is the best way to speed up development. An SDK handles low‑level details and lets you focus on your project tasks. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code examples demonstrate how to make calls to Aspose.Cells web services using various SDKs: