Set data shown in a chart

Replace data points in a series

Tailored presentation

Sales by month filled
sales-by-month.pptx

This sales-by-month-template.pptx example has a line chart with two data points. The shell command below uses setChartData to add values for eight more months, then downloads the result as sales-by-month.pptx in your current directory.

The X axis is set up in PowerPoint as a date axis, which stores dates internally as the number of days since Jan 1, 1900 and allows them to be formatted independently, in this case showing just the month. We specify the dates to setChartData in YYYY-MM-DD format, from which Slide Tailor converts them into numerical days. Alternatively we could work out the numbers 45292, 45323, 45352, ... beginning those months and specify them as JSON numbers. Had we configured the X axis to treat "Jan", "Feb", "Mar" as strings, we would have to specify them as strings in the JSON.

Add new series

Tailored presentation

Channels filled
channels.pptx

The same setChartData instruction adds or removes data series from your chart as the columns of your input array require. This channels-template.pptx example has an area chart with a single series. The shell command below uses setChartData to add two more series, then downloads the result as channels.pptx in your current directory.

A new series copies its chart type and formatting from the last series in the chart. If you're using series colors indexed to your theme, as PowerPoint does by default, Slide Tailor will rotate through theme colors and variations as PowerPoint does. If you need more control over series formatting, consider putting many series in your template, formatting them as needed, and allowing Slide Tailor to delete unneeded ones.