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.
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:
- The chart structure from your template is preserved
- Data values are updated from your data source (Excel tables, JSON collections, etc.)
- The chart is regenerated with the new data
Chart Syntax
To link a chart to data, you need to:
- Insert a chart placeholder in your PowerPoint template (any chart type)
- Open Selection Pane (Alt+F10), select your chart
- Right-click → View Alt Text
- 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.
Data Structure
Excel Tables (Recommended)
Chart data is best structured as Excel tables:
- Format your data as an Excel table (Ctrl+T)
- Name the table (e.g., "SalesData")
- Reference it in your chart:
{{type=chart data=xlsx.Sheet1!SalesData}}
Example Excel Structure:
| Month | Product A | Product B | Product C |
|---|---|---|---|
| January | 1000 | 2000 | 1500 |
| February | 1200 | 2200 | 1600 |
The first column typically becomes categories, remaining columns become data series.
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, reference collections:
{
"salesData": [
{"month": "January", "value": 10000},
{"month": "February", "value": 12000}
]
}
Reference with: {{type=chart data=json.salesData}}
See: Sales report with charts and tables in PowerPoint from Excel data for detailed examples.
Best Practices
1. Consistent Data Structure
Ensure your data follows a consistent structure across all records to maintain chart formatting.
2. Data Validation
- Verify numerical values are valid numbers
- Check that category labels match expected values
- Ensure data arrays have the same length
3. Chart Design
- Use clear, readable fonts
- Choose appropriate colors for your brand
- Add titles and labels for clarity
- Consider data labels for better readability
4. Template Setup
- Create your chart in PowerPoint first with sample data
- 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
5. 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
Chart Not Updating
- Data Format: Ensure data is in the correct format for the chart type
- Data Structure: Verify data structure matches chart requirements
- Placeholder Names: Check that placeholder names match data fields
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:
- Bar Charts - Horizontal bar charts
- Column Charts - Vertical column charts
- Line Charts - Line charts for trends
- Pie Charts - Pie charts for proportions
Tips
-
Test with Sample Data: Always test your chart template with sample data before using it in production
-
Keep It Simple: Start with simple charts and add complexity as needed
-
Document Your Structure: Document the expected data structure for your charts
-
Handle Edge Cases: Consider what happens with empty data, single values, or very large datasets
For more information, see Basic Placeholders.