Update a Chart Category

Introduction

In PowerPoint documents, to create a chart, data categories define various groups or segments of data within each series. They represent the axis along which the values of the series are displayed. Use the following method to update data categories in charts. 

UpdateChartCategory

API Information

API Type Description Resource
/slides/{name}/slides/{slideIndex}/shapes/{shapeIndex}/categories/{categoryIndex} PUT Updates a data category in a chart in a presentation saved in a storage. UpdateChartCategory

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 presentation slide.
shapeIndex integer path true The 1-based index of a shape (must be a chart).
categoryIndex integer path true The 1-based index of a data category.
category ChartCategory body true The data transfer object with category data.
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 column chart (the second shape) on the first slide - sales volumes of products “Product A”, “Product B”, and “Product C” for 2021 to 2023. Update sales data (25, 20, 30) for 2023.

Sales chart

SDK Solutions

The result:

Sales chart

SDKs

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