Add a Chart Category

Introduction

In PowerPoint documents, data for charts is usually organized in a table consisting of series and categories of data. Use the following method to add data categories to a presentation chart. You provide data points that will be added to a respective data series for the category.

CreateChartCategory

API Information

API Type Description Resource
/slides/{name}/slides/{slideIndex}/shapes/{shapeIndex}/categories POST Adds a data category to a chart in a presentation saved in a storage. CreateChartCategory

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).
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.
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 2022. Add sales data (30, 35, 25) for 2023.

Sales chart

cURL Solution

SDK Solutions

The result:

Sales chart

SDKs

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