---
title: "chart.insert: Chart — Slide kit command — Kition"
description: "Inserts a chart (column, bar, line, pie, waterfall, funnel, treemap, combo, …) with categories and series (each with an optional color, combo type and waterfall totals) on the current slide; format.fontSize, format.color, format.bold and format.fontName on it format its text."
canonical: "https://developer.kition.ai/docs/kits/slide/commands/chart.insert"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/slide/commands/chart.insert](https://developer.kition.ai/docs/kits/slide/commands/chart.insert)

# chart.insert

**Chart.** Inserts a chart (column, bar, line, pie, waterfall, funnel, treemap, combo, …) with categories and series (each with an optional color, combo type and waterfall totals) on the current slide; format.fontSize, format.color, format.bold and format.fontName on it format its text.

- Kit: Slide 0.1.0 (.kslide and .pptx); reference: [Slide kit commands](https://developer.kition.ai/docs/kits/slide.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `categories` | `any[]` | no |  |
| `rect` | `number[]` | no | [x, y, w, h] in points |
| `series` | `object[]` | no | [{name, values, color?, type? (combo: column\|line\|area…), totals? (waterfall: indexes of total points)}]; combo: column\|line\|area…; waterfall: indexes of total points |
| `title` | `any` | no | text\|null (default with series: one series' name, else none); default with series: one series' name, else none |
| `type` | `"column" \| "stackedColumn" \| "percentColumn" \| "bar" \| "stackedBar" \| "percentBar" \| "line" \| "lineMarkers" \| "stackedLine" \| "area" \| "stackedArea" \| "pie" \| "doughnut" \| "scatter" \| "bubble" \| "radar" \| "filledRadar" \| "waterfall" \| "funnel" \| "histogram" \| "pareto" \| "treemap" \| "sunburst" \| "boxWhisker" \| "stock" \| "surface" \| "combo"` | no |  |

## Call through slide_run

```text
slide_run {
  "path": "<file>.pptx",
  "steps": [{ "command": "chart.insert" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `categories`, `rect`, `series`, `title`, `type`. slide_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "categories": {
      "items": {},
      "type": "array"
    },
    "rect": {
      "description": "[x, y, w, h] in points",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "series": {
      "description": "[{name, values, color?, type? (combo: column|line|area…), totals? (waterfall: indexes of total points)}]; combo: column|line|area…; waterfall: indexes of total points",
      "items": {
        "additionalProperties": true,
        "properties": {
          "color": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "totals": {},
          "type": {},
          "values": {}
        },
        "type": "object"
      },
      "type": "array"
    },
    "title": {
      "description": "text|null (default with series: one series' name, else none); default with series: one series' name, else none"
    },
    "type": {
      "enum": [
        "column",
        "stackedColumn",
        "percentColumn",
        "bar",
        "stackedBar",
        "percentBar",
        "line",
        "lineMarkers",
        "stackedLine",
        "area",
        "stackedArea",
        "pie",
        "doughnut",
        "scatter",
        "bubble",
        "radar",
        "filledRadar",
        "waterfall",
        "funnel",
        "histogram",
        "pareto",
        "treemap",
        "sunburst",
        "boxWhisker",
        "stock",
        "surface",
        "combo"
      ],
      "type": "string"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/slide-darwin-arm64@0.1.0 and the kit itself (slide_commands through @kition/cli@0.1.1, built from KitionAI/kition-slide@7ef3d11).
