Set a Chart Axis

Introduction

You can create various types of charts such as column charts, line charts, waterfall charts, etc. Each of them has its axes that help interpret the data. The horizontal axis typically displays categories or time periods. The Vertical axis displays data values or numerical indicators. Some charts may have a third axis, for instance, to display additional information or compare data. Use the following method to customize the axes, add labels, adjust scales, and apply other settings.

SetChartAxis

API Information

API Type Description Resource
/slides/{name}/slides/{slideIndex}/shapes/{shapeIndex}/{axisType} PUT Updates the chart axis properties in a presentation saved in a storage. SetChartAxis

Request Parameters

Name Type Location Required Description
name string path true The name of a presentation file.
slideIndex integer path true The 1-based index of a slide.
shapeIndex integer path true The 1-based index of a shape (must be a chart).
axisType AxisType path true The type of an axis.
axis Axis body true The data transfer object with the axis parameters.
password string header false The password to open the presentation.
folder string query false The path to the folder containing the presentation file.
storage string query false The name of the storage contaning the folder.

Examples

The document MyPresentation.pptx saved in the default storage contains a chart (the first shape) on the second slide that displays the number of items sold for quarters 1 through 4. Apply the following settings for the vertical axis:

  • show the axis title
  • set the maximum value to 35

The chart

cURL Solution

SDK Solutions

The result:

The chart

SDKs

Check Available SDKs to learn how to add an SDK to your project.