Slide kit command

drawing.chart

Change Chart

Changes a chart drawing object's kind, title, legend, data labels or data.

Kit
Slide 0.1.0 (.kslide and .pptx)
Changes the document
yes
Acts on
ids (a list of ids), which a run step’s on fills

Parameters

Parameters of drawing.chart
NameTypeRequiredDescription
categoriesstring[]no
dataLabelPositionanyno
dataLabelsbooleanno
gridlinesbooleanno
idinteger | stringno
ids(integer | string)[]noone chart, instead of id
kindstringnothe chart kind: column, bar, line, pie, …
legend"top" | "bottom" | "left" | "right" | "topRight" | nullnolegend position, null for none
onSlideintegernothe slide the ids are on, from 1
seriesobject[]no[{name, values, color?}]
seriesFormatobject[]no[{index, color?, lineWidth?, marker?, smooth?, trendline?, errorBars?}]
titlestring | nullnochart title, null for none
xAxisobjectno{min?, max?, major?, numberFormat?, hidden?}
xTitlestring | nullnox axis title
yAxisobjectno{min?, max?, major?, numberFormat?, hidden?}
yTitlestring | nullnoy axis title

Call through slide_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: categories, dataLabelPosition, dataLabels, gridlines, id, ids, kind, legend, onSlide, series, seriesFormat, title, xAxis, xTitle, yAxis, yTitle. 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": "string"
      },
      "type": "array"
    },
    "dataLabelPosition": {},
    "dataLabels": {
      "type": "boolean"
    },
    "gridlines": {
      "type": "boolean"
    },
    "id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Shape"
      ]
    },
    "ids": {
      "description": "one chart, instead of id",
      "items": {
        "description": "an id",
        "oneOf": [
          {
            "type": "integer"
          },
          {
            "type": "string"
          }
        ]
      },
      "type": "array",
      "x-khp-types": [
        "Shape"
      ]
    },
    "kind": {
      "description": "the chart kind: column, bar, line, pie, …",
      "type": "string"
    },
    "legend": {
      "description": "legend position, null for none",
      "oneOf": [
        {
          "enum": [
            "top",
            "bottom",
            "left",
            "right",
            "topRight"
          ],
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "onSlide": {
      "description": "the slide the ids are on, from 1",
      "type": "integer"
    },
    "series": {
      "description": "[{name, values, color?}]",
      "items": {
        "additionalProperties": true,
        "properties": {
          "color": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "values": {}
        },
        "type": "object"
      },
      "type": "array"
    },
    "seriesFormat": {
      "description": "[{index, color?, lineWidth?, marker?, smooth?, trendline?, errorBars?}]",
      "items": {
        "additionalProperties": true,
        "properties": {
          "color": {
            "type": "string"
          },
          "errorBars": {},
          "index": {
            "description": "a position counted from 0 (the first is 0)",
            "type": "integer"
          },
          "lineWidth": {},
          "marker": {},
          "smooth": {},
          "trendline": {}
        },
        "type": "object"
      },
      "type": "array"
    },
    "title": {
      "description": "chart title, null for none",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "xAxis": {
      "additionalProperties": true,
      "description": "{min?, max?, major?, numberFormat?, hidden?}",
      "properties": {
        "hidden": {
          "type": "boolean"
        },
        "major": {},
        "max": {},
        "min": {},
        "numberFormat": {}
      },
      "type": "object"
    },
    "xTitle": {
      "description": "x axis title",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "yAxis": {
      "additionalProperties": true,
      "description": "{min?, max?, major?, numberFormat?, hidden?}",
      "properties": {
        "hidden": {
          "type": "boolean"
        },
        "major": {},
        "max": {},
        "min": {},
        "numberFormat": {}
      },
      "type": "object"
    },
    "yTitle": {
      "description": "y axis title",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "x-khp-position": "independent"
}

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.