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

This REST API updates the chart value axis.

REST API

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

Request Parameters

Parameter Name Type Location Description
name string path Name of the Excel file stored in the cloud.
sheetName string path Name of the worksheet that contains the chart.
chartIndex integer path Zero‑based index of the chart whose value axis will be updated.
axis object body JSON object that defines the new value‑axis settings (e.g., minimum, maximum, majorUnit).
folder string query Cloud folder path where the file is located (optional).
storageName string query Name of the storage service to use (optional).

Request Body Schema (axis object)

The axis object may contain any of the following properties:

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

Only the properties you need to change have to be included in the JSON payload.

Sample Request Body

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

cURL Example

curl -v "https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/charts/{chartIndex}/valueaxis" \
  -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
      }'

Successful Response

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

Error Responses

HTTP Status Code Message
400 400 Invalid request parameters or body.
401 401 Authentication failed.
404 404 Specified file, worksheet, or chart not found.
500 500 Internal server error.

The OpenAPI Specification defines a publicly accessible programming interface and lets you carry out REST interactions directly from a web browser.

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: