Aspose.Cells Cloud API - Update Chart Value Axis (POST /valueaxis)

The PostChartValueAxis API (POST https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/charts/{chartIndex}/valueaxis) enables developers to update the value axis of a specific chart in an Excel workbook stored in Aspose.Cells Cloud by sending a request body containing axis properties such as bounds, tick units, and logarithmic scaling—allowing precise control over axis behavior without manual intervention.

Summary:
Modify the value axis of a specific chart in an Excel workbook stored in Aspose Cloud. You can set bounds, tick units, logarithmic scaling, and other axis properties in a single request.

The Post Chart Value Axis Web API

POST https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/charts/{chartIndex}/valueaxis

Security and Authentication

The API uses JWT token-based authentication. Include the token in the Authorization header:

Authorization: Bearer <jwt token>

Request Parameters

Parameter Name Type Path/Query String/HTTPBody Description
name String Path The file name.
sheetName String Path The worksheet name.
chartIndex Integer Path The chart index.
axis class:axis HTTPBody Axis
folder String Query The folder where the file is situated.
storageName String Query The storage name where the file is situated.

Response

[
  {
    "Name": "CellsCloudResponse",
    "DataType": {
      "Identifier": "Class",
      "Reference": "CellsCloudResponse"
    }
  }
]

Sample response headers

HTTP/1.1 200 OK
Content-Type: application/json

HTTP Status Codes

Code Meaning Description
200 OK The request completed successfully.
400 Bad Request The request is malformed or one or more parameters are invalid.
401 Unauthorized Authentication failed, or the JWT token is missing or expired.
404 Not Found The requested workbook, worksheet, or resource was not found.
413 Payload Too Large The uploaded file exceeds the allowed size limit.
500 Internal Server Error The server encountered an unexpected error while processing the request.

Replace the placeholders with your actual values.

Placeholder Description
{name} Name of the Excel file (e.g., Book1.xlsx).
{sheetName} Worksheet that contains the chart (e.g., Sheet1).
{chartIndex} Zero-based index of the chart (e.g., 0).

Request Body Schema (axis object)

Only the properties you need to change have to be present.

Property Type Required Description
minimum number No Lower bound of the axis.
maximum number No Upper bound of the axis.
majorUnit number No Interval between major tick marks.
minorUnit number No Interval between minor tick marks.
logBase number No Base of the logarithm when isLogarithmic is true.
isLogarithmic boolean No Whether the axis uses a logarithmic scale.
displayUnit string No Unit label displayed on the axis (e.g., "Thousands").
tickMark string No Style of tick marks ("inside", "outside", etc.).
crossAt number No Position where the axis crosses the perpendicular axis.

Example Request Body

{
  "minimum": 0,
  "maximum": 200,
  "majorUnit": 20,
  "minorUnit": 5,
  "logBase": 10,
  "isLogarithmic": false,
  "displayUnit": "Units",
  "tickMark": "inside",
  "crossAt": 0
}

Example Requests

cURL

curl -v "https://api.aspose.cloud/v3.0/cells/Book1.xlsx/worksheets/Sheet1/charts/0/valueaxis?folder=&storageName=" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt token>" \
  -d '{
        "minimum": 0,
        "maximum": 200,
        "majorUnit": 20,
        "minorUnit": 5,
        "logBase": 10,
        "isLogarithmic": false,
        "displayUnit": "Units",
        "tickMark": "inside",
        "crossAt": 0
      }'

Responses

Success (200)

{
  "Code": 200,
  "Status": "OK"
}

The response type is CellsCloudResponse.

HTTP Status Codes

Code Meaning Description
200 OK Axis updated successfully.
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.

How to Use the Post Chart Value Axis API with SDKs?

Post Chart Value Axis API Specification

The Post Chart Value Axis API Specification defines a publicly accessible programming interface and enables you to carry out REST interactions directly from a web browser.

Use Aspose.Cells Cloud SDKs

Using the SDK is the fastest way to develop, as it abstracts away the low‑level details, allowing you to use the API with short code.
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: