Doc kit command

chart.insert

Chart

Inserts a chart (column, bar, line, pie…) with categories and series values at the caret.

Kit
Doc 0.1.0 (.docx)
Changes the document
yes

Parameters

Parameters of chart.insert
NameTypeRequiredDescription
categoriesanyno
dataLabelsanyno
gridlinesanyno
heightnumbernopoints
kindstringnoread by the command beside its listed parameters
legendanyno
seriesobject[]no[{name, values, color?}]
titleanynotext|null
type"column" | "stackedColumn" | "percentColumn" | "bar" | "stackedBar" | "percentBar" | "line" | "lineMarkers" | "stackedLine" | "area" | "stackedArea" | "pie" | "doughnut" | "scatter" | "radar"no
widthnumbernopoints
xTitleanyno
yTitleanyno

Call through doc_run

text
doc_run {
  "path": "<file>.docx",
  "steps": [{ "command": "chart.insert" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: categories, dataLabels, gridlines, height, kind, legend, series, title, type, width, xTitle, yTitle. doc_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": {},
    "dataLabels": {},
    "gridlines": {},
    "height": {
      "description": "points",
      "type": "number"
    },
    "kind": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "legend": {},
    "series": {
      "description": "[{name, values, color?}]",
      "items": {
        "additionalProperties": true,
        "properties": {
          "color": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "values": {}
        },
        "type": "object"
      },
      "type": "array"
    },
    "title": {
      "description": "text|null"
    },
    "type": {
      "enum": [
        "column",
        "stackedColumn",
        "percentColumn",
        "bar",
        "stackedBar",
        "percentBar",
        "line",
        "lineMarkers",
        "stackedLine",
        "area",
        "stackedArea",
        "pie",
        "doughnut",
        "scatter",
        "radar"
      ],
      "type": "string"
    },
    "width": {
      "description": "points",
      "type": "number"
    },
    "xTitle": {},
    "yTitle": {}
  },
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (doc_commands through @kition/[email protected], built from KitionAI/kition-doc@41e14a8). As data: commands.jsonl.