Update Chart Value Axis (POST /valueaxis)

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.


Prerequisites

  1. JWT access token – obtain a token as described in the Authentication guide.
  2. The target workbook must already be uploaded to Aspose Cloud storage (or the default storage).
  3. Know the worksheet name and the zero‑based chart index you wish to modify.

Endpoint

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

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

Authentication

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

Authorization: Bearer <jwt token>

Security and Authentication

The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.

Request Parameters

Name Location Type Required Description
name Path string Yes Excel file name stored in the cloud.
sheetName Path string Yes Worksheet that holds the chart.
chartIndex Path int Yes Zero‑based index of the chart to update.
axis Body object Yes Axis settings (see Request Body Schema).
folder Query string No Cloud folder path where the file resides.
storageName Query string No Name of the storage service to use.

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/<code class=\"placeholder\">{name}</code>/worksheets/<code class=\"placeholder\">{sheetName}</code>/charts/<code class=\"placeholder\">{chartIndex}</code>/valueaxis?folder=<code class=\"placeholder\">{folder}</code>&storageName=<code class=\"placeholder\">{storageName}</code>" \
  -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
      }'

SDK Samples


Responses

Success (200)

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

The response type is CellsCloudResponse.

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.

Additional Resources


For any questions or feedback, please contact the Aspose.Cells Cloud support team.