Charts
Your AI assistant uses these tools to add data visualizations to your slides — bar charts, pie charts, line graphs, and more. Just describe the data and chart type you want.
Charts are created in two steps: element_bulk_create places the chart with placeholder data, then element_update_chart populates the real series and styling — and restyles it later. Charts are rendered in the editor and exported to PowerPoint with full data and styling.
For other element types (shapes, text, lines), see Element Operations. For images, see Images.
Why Rideful Charts
- Theme-aware defaults — Charts auto-inherit your deck's color palette. No manual color picking.
- Transparent background — Charts render over the slide background, not in a white box. Works on dark and light slides.
- Agent-driven creation — Describe the chart you want and your AI assistant builds it — no spreadsheets, no chart wizards.
- Surgical updates — Ask your agent to change one series, update a title, or adjust axis bounds — without recreating the chart.
- Native PowerPoint export — Charts export as editable PowerPoint charts with embedded data, not images. Click any chart in PowerPoint to view and edit the underlying data.
Creating a Chart
When you ask to “add a bar chart showing quarterly revenue” or “put a pie chart on slide 3,” your assistant places the chart with element_bulk_create — one element with elementType: "chart", a chart type, and a position — and then fills in the data and styling with element_update_chart. The chart appears on the slide immediately, with placeholder data until the second call lands.
Parameters — placing the chart
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | The deck ID |
slideId | string | Yes | The slide to add the chart to |
x, y | number | Yes | Position in pixels from top-left corner |
width, height | number | Yes | Dimensions in pixels. Minimum recommended: 640 × 400 |
elementType | string | Yes | 'chart' — set on the element inside elements[] |
chartType | enum | Yes | 'bar', 'line', 'area', 'pie', 'scatter', 'bubble', 'doughnut', or 'radar' |
Example — Bar Chart
// 1. Place the chart — it appears with placeholder data
element_bulk_create({
deckId: "deck_abc123",
slideId: "slide_002",
elements: [
{
elementType: "chart",
chartType: "bar",
x: 60, y: 160,
width: 640, height: 400
}
]
})
// Response:
// {
// slides: [
// { slideId: "slide_002",
// elements: [
// { elementId: "chart-Ka1bZ9mQ",
// type: "chart" }
// ] }
// ]
// }
// 2. Populate it with the real data and styling
element_update_chart({
deckId: "deck_abc123",
elementId: "chart-Ka1bZ9mQ",
series: [
{
name: "Revenue",
labels: ["Q1", "Q2", "Q3", "Q4"],
values: [120, 180, 150, 210],
color: "#4472C4"
},
{
name: "Expenses",
labels: ["Q1", "Q2", "Q3", "Q4"],
values: [90, 110, 100, 130],
color: "#ED7D31"
}
],
title: "Revenue vs Expenses",
showLegend: true,
legendPos: "b",
barGrouping: "clustered",
valAxisTitle: "USD (thousands)"
})Example — Pie Chart
element_bulk_create({
deckId: "deck_abc123",
slideId: "slide_003",
elements: [
{
elementType: "chart",
chartType: "pie",
x: 320, y: 160,
width: 640, height: 400
}
]
})
element_update_chart({
deckId: "deck_abc123",
elementId: "chart-Xa9bK2mQ",
series: [
{
name: "Market Share",
labels: ["Product A", "Product B", "Product C", "Other"],
values: [45, 25, 20, 10]
}
],
title: "Market Share 2025",
showLegend: true,
showPercent: true
})Example — Styled Doughnut Chart
// Chart on a dark slide with custom styling
element_bulk_create({
deckId: "deck_abc123",
slideId: "slide_005",
elements: [
{
elementType: "chart",
chartType: "doughnut",
x: 60, y: 120,
width: 640, height: 420
}
]
})
element_update_chart({
deckId: "deck_abc123",
elementId: "chart-Lm3pQ8vT",
series: [
{
name: "Budget Allocation",
labels: ["Engineering", "Marketing", "Sales", "Operations"],
values: [45, 25, 20, 10],
colors: ["#5EA8A7", "#277884", "#FE4447", "#AAB7B8"]
}
],
title: "Budget Allocation 2025",
showPercent: true,
holeSize: 70,
chartFontFamily: "Inter",
chartFontSize: 12,
fillOpacity: 90
})Supported Chart Types
| Type | Description | Best For |
|---|---|---|
bar | Vertical or horizontal bars | Comparing categories |
line | Line graph with optional markers | Trends over time |
area | Filled area under a line | Volume or cumulative trends |
pie | Circular segments | Proportions of a whole |
doughnut | Pie chart with hollow center | Proportions with a cleaner look |
scatter | X-Y data points | Correlations between two variables |
bubble | Scatter with variable-sized points (requires sizes array) | Three-dimensional data |
radar | Spider/web chart | Multi-axis comparisons |
Updating a Chart
Once a chart is on a slide, your assistant can update its data, styling, position, and size using element_update_chart. Only the fields you provide are changed — everything else stays the same.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | The deck ID |
elementId | string | Yes | The chart element ID — returned by element_bulk_create, or found later via slide_get |
chartType | enum | No | Change the chart type — same eight values as element_bulk_create |
series | array | No | Array of data series — replaces every existing series. Each: { name, labels, values, color? }. Scatter/bubble charts use xValues (numeric) instead of labels. Bubble charts also require sizes. |
title | string | No | Chart title displayed above the chart |
showLegend | boolean | No | Show or hide the legend |
legendPos | enum | No | 'b' (bottom), 't' (top), 'l' (left), 'r' (right), 'tr' (top-right) |
catAxisTitle, valAxisTitle | string | No | Axis titles for category and value axes |
showValue, showLabel, showPercent | boolean | No | Show data values, category labels, or percentages on data points |
dataLabelPosition | enum | No | 'bestFit', 'b', 'ctr', 'inEnd', or 'outEnd' |
barGrouping | enum | No | Bar charts only: 'clustered', 'stacked', or 'percentStacked' |
barDir | enum | No | Bar charts only: 'col' (vertical) or 'bar' (horizontal) |
lineSmooth | boolean | No | Line charts only: smooth the line curves |
lineDataSymbol | enum | No | Line charts only: 'circle', 'diamond', 'square', or 'none' |
| Styling & Axes | |||
showCatGridLine, showValGridLine | boolean | No | Show gridlines on category or value axis (default: off for clean presentations) |
valAxisMinVal, valAxisMaxVal | number | No | Set explicit min/max bounds for the value axis (default: auto-scale) |
catAxisHidden, valAxisHidden | boolean | No | Hide an axis entirely (useful for minimalist designs; auto-hidden for pie/doughnut/radar) |
holeSize | number | No | Doughnut hole size as a percentage, 0–90 (default: 60) |
chartFontFamily | string | No | Font family for all chart text (title, legend, axis labels, data labels) |
chartFontSize | number | No | Base font size in points. Title renders at 1.2×, data labels at 0.85× |
chartFontColor | string | No | Font color as hex (e.g., "#FFFFFF"). Auto-resolved from slide background if omitted |
fillOpacity | number | No | Fill opacity for series colors, 0–100. Defaults: 30 for radar, 50 for area, 100 for others |
x, y, width, height | number | No | Reposition or resize the chart |
Example
// Update the chart with new Q4 data
element_update_chart({
deckId: "deck_abc123",
elementId: "elem_chart001",
series: [
{
name: "Revenue",
labels: ["Q1", "Q2", "Q3", "Q4"],
values: [120, 180, 150, 245],
color: "#4472C4"
},
{
name: "Expenses",
labels: ["Q1", "Q2", "Q3", "Q4"],
values: [90, 110, 100, 125],
color: "#ED7D31"
}
],
title: "Revenue vs Expenses (Updated)"
})Charts Alongside Other Elements
A chart does not need a call of its own. When building a slide with several elements, your assistant can include the chart in the same element_bulk_create call. Pass elementType: "chart" with a chartType to create a chart with auto-generated sample data. Then use element_update_chart to populate it with real data.
This two-step approach lets the assistant plan the full slide layout atomically, then fill in chart data separately.
Example
// Step 1: Create layout with chart placeholder
element_bulk_create({
deckId: "deck_abc123",
slideId: "slide_004",
elements: [
{
elementType: "shape",
shapeType: "rectangle",
x: 0, y: 0,
width: 1280, height: 80,
fillColor: "#1C2833",
text: "Performance Dashboard",
fontSize: 32,
textColor: "#FFFFFF",
role: "title"
},
{
elementType: "chart",
chartType: "bar",
x: 60, y: 120,
width: 560, height: 400
},
{
elementType: "chart",
chartType: "pie",
x: 660, y: 120,
width: 560, height: 400
}
]
})
// Step 2: Populate with real data
element_update_chart({
deckId: "deck_abc123",
elementId: "elem_chart_1",
series: [{ name: "Revenue", labels: ["Q1","Q2","Q3","Q4"], values: [120,180,150,210] }],
title: "Quarterly Revenue"
})Tips
- Minimum size — 640 × 400 px recommended for readability. Smaller charts may have overlapping labels.
- Series colors — optional hex values (e.g.,
"#4472C4"). If omitted, colors are auto-assigned from the deck's theme palette. - Labels and values — every series must have the same number of
labelsandvalues. A mismatch will return a validation error. - Bubble charts — include a
sizesarray in each series to control point sizes. - Deleting charts — use
element_deletewith the chart's element ID. No special cleanup is needed. - Export — charts are exported to PowerPoint with full data and styling. They render as native PowerPoint charts, not images.
- Auto font color — when
chartFontColoris omitted, chart text automatically picks a readable color based on the slide background — dark text on light slides, light text on dark slides. Override with an explicit hex value if needed. - Gridlines — gridlines are off by default for clean presentations. Enable with
showValGridLine: truewhen data precision matters. Gridline colors auto-adjust for the slide background. - Font sizing —
chartFontSizeis a base size. The title renders at 1.2× and data labels at 0.85× for balanced typography from a single value.
Related
- Element Operations — Create and style shapes, text, and lines; delete any element including charts
- Export to PowerPoint — Charts are exported as native PowerPoint charts with full data
- Import Presentation — Charts from imported .pptx files are preserved with their data
- Slide Operations — Use slide_get to find chart element IDs on a slide