Slide kit command

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)
Changes the document
yes

Parameters

Parameters of chart.insert
NameTypeRequiredDescription
categoriesany[]no
rectnumber[]no[x, y, w, h] in points
seriesobject[]no[{name, values, color?, type? (combo: column|line|area…), totals? (waterfall: indexes of total points)}]; combo: column|line|area…; waterfall: indexes of total points
titleanynotext|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/[email protected] and the kit itself (slide_commands through @kition/[email protected], built from KitionAI/kition-slide@7ef3d11). As data: commands.jsonl.