Charts in PPTX Template

Learn how to create dynamic charts in PowerPoint templates that are populated with data during the merge process.

Overview

Charts in PowerPoint can be populated with data from your data source. The chart structure is defined in your template, and data values are inserted during the merge.

Generation only works when the data layout and the placeholder chart are set up in a specific way. If either is wrong, dummy series from the inserted chart stay in the output.

Worked examples with sample Excel and PowerPoint files:

Supported Chart Types

  • Bar Charts - Horizontal bar charts for comparing values (stacked, clustered, 100% stacked)
  • Column Charts - Vertical column charts for comparing categories (stacked, clustered, 100% stacked)
  • Line Charts - Line charts for showing trends over time
  • Pie Charts - Pie charts for showing proportions

The chart type in your template determines the final chart type. You can use:

  • Stacked charts
  • Clustered charts
  • 100% stacked charts
  • Various other chart variations

Each chart type has specific requirements for data structure. See the individual chart type documentation for details.

How Chart Data Works

Charts in PowerPoint are linked to data from your data source. During the merge process:

  1. The chart structure from your template is preserved
  2. Data values are updated from your data source (Excel tables, JSON collections, etc.)
  3. The chart is regenerated with the new data

Chart Syntax

To link a chart to data, you need to:

  1. Insert a chart placeholder in your PowerPoint template (any chart type)
  2. Open Selection Pane (Alt+F10), select your chart
  3. Right-click → View Alt Text
  4. Set the Description field to: {{type=chart data=xlsx.Sheet1!Table1}}

Example:

{{type=chart data=xlsx.Sheet1!SalesData}}

This references an Excel table named "SalesData" in Sheet1.

Required generation setup

A chart with multiple categories and multiple series only generates correctly when the source table and the placeholder chart match the rules below.

1. Categories as rows, series as columns

The data must be oriented like this:

  • Categories are the row labels (for example months of the year)
  • Series are the columns (for example lead channels)
  • Values are the cells

Correct orientation:

Month Email Organic Paid ads
January 120 80 45
February 140 90 50
March 135 95 60
  • Categories: January, February, March
  • Series: Email, Organic, Paid ads
  • Values: the numbers in the cells

If your source data is the other way around (months across the columns, channels down the rows), transpose it in Excel before you create the named table:

  1. Copy the range you want in the PowerPoint chart.
  2. Click an empty cell and use Paste Special with Transpose checked.
  3. Select the transposed range and press Ctrl+T to create an Excel table.
  4. Give the table a meaningful name (Table Design → Table Name). You will reference this name in the chart alt text.

Then set the placeholder chart’s Alt Text Description to:

{{type=chart data=xlsx.SheetName!TableName}}

Replace SheetName with the worksheet that holds the table and TableName with the name you assigned.

2. Delete all but the first series on the placeholder chart

When you insert a chart in PowerPoint, the dummy chart usually comes with several series (several columns in Edit Data).

Delete every series except the first one. Extra dummy series in the placeholder are not overwritten during merge, so they would still show PowerPoint’s sample data in the generated file.

The first remaining series is the template the engine uses. Additional series from your table are created from that first series.

3. Extra placeholder series stay as dummy data

If the inserted chart has more series than the data you provide, the leftover dummy series are left untouched. Start from a single-series placeholder so the generated chart only contains series that come from your table.

Data Structure

Excel Tables (Recommended)

Chart data is best structured as Excel tables:

  1. Orient the data as described above (categories as rows, series as columns). Transpose first if needed.
  2. Format the range as an Excel table (Ctrl+T).
  3. Name the table (e.g. "SalesData").
  4. Reference it in your chart: {{type=chart data=xlsx.Sheet1!SalesData}}

The first column becomes categories. Remaining columns become data series. Cell values become the plotted numbers.

Chart Titles from Excel

You can also reference chart titles from Excel cells or named ranges:

  • Chart title: {{xlsx.Sheet1!A1}} (references cell A1)
  • Chart title: {{xlsx.Sheet1!ChartTitle}} (references named range)

JSON Collections

For JSON data, each object is a category (a row). Properties other than the category label are series (columns):

{
  "salesData": [
    {"month": "January", "email": 120, "organic": 80, "paid": 45},
    {"month": "February", "email": 140, "organic": 90, "paid": 50}
  ]
}

Reference with: {{type=chart data=json.salesData}}

See:

for detailed examples and downloadable files.

Best Practices

1. Match the required orientation

Do not feed a pivot-style table that has categories across columns. Transpose it, create a named table, then point the chart at that table.

2. Strip dummy series from the placeholder

Always open Edit Data on the inserted chart and delete extra series columns. Leave one series only.

3. Data validation

  • Verify numerical values are valid numbers
  • Check that category labels match expected values
  • Ensure every series column has a header (that header becomes the series name)

4. Chart design

  • Use clear, readable fonts
  • Choose appropriate colors for your brand
  • Add titles and labels for clarity
  • Consider data labels for better readability

5. Template setup

  • Create your chart in PowerPoint first with sample data
  • Delete all but the first series
  • Apply desired formatting and styling (colors, fonts, etc.)
  • Set the chart's Alt Text Description to the data reference expression
  • The structure and formatting will be preserved during merging

6. Multiple Sheets

You can reference charts from different Excel sheets:

  • {{type=chart data=xlsx.Sheet1!Table1}} - Chart from Sheet1
  • {{type=chart data=xlsx.Sheet2!Table2}} - Chart from Sheet2
  • {{type=chart data=xlsx.ChartData!SalesTable}} - Chart from named sheet

Common Issues

Dummy series still visible after generate

  • Extra series on the placeholder: Delete all but the first series in the chart’s Edit Data view. Extra dummy series are not overwritten.
  • More series in the chart than in the table: Leftover placeholder series stay as PowerPoint sample data. Start from one series.

Chart not updating / wrong categories vs series

  • Data orientation: Categories must be row labels, series must be columns. Transpose the range in Excel if they are swapped.
  • Not an Excel table: Select the range, press Ctrl+T, and give the table a name that matches the alt-text reference (xlsx.SheetName!TableName).
  • Sheet or table name: The names in {{type=chart data=xlsx.SheetName!TableName}} must match the workbook exactly (case-sensitive for the expression).

Formatting lost

  • Chart formatting from template is generally preserved
  • Some complex formatting may need to be reapplied
  • Test with sample data to verify formatting

Data mismatch

  • Ensure number of data points matches chart structure
  • Verify categories and values arrays have matching lengths
  • Check for missing or null values

Chart Type Guides

For detailed information on specific chart types:

Tips

  1. Test with Sample Data: Always test your chart template with sample data before using it in production

  2. Keep It Simple: Start with simple charts and add complexity as needed

  3. Document Your Structure: Document the expected data structure for your charts

  4. Handle Edge Cases: Consider what happens with empty data, single values, or very large datasets

For more information, see Basic Placeholders.