Doc kit command

drawing.chart

Change Chart

Changes a chart by id: kind, title, legend, data labels, gridlines, axis titles and series.

Kit
Doc 0.1.0 (.docx)
Changes the document
yes

Parameters

Parameters of drawing.chart
NameTypeRequiredDescription
categories(string | number)[]no
dataLabelPositionstringnoread by the command beside its listed parameters
dataLabelsbooleanno
gridlinesbooleanno
idinteger | stringno
idsany[]noread by the command beside its listed parameters
kindstringnochart type
legend"top" | "bottom" | "left" | "right" | "topRight" | nullno
seriesobject[]no[{name, values, color?}]
seriesFormatobjectnoread by the command beside its listed parameters
titlestring | nullno
xAxisobjectnoread by the command beside its listed parameters
xTitlestring | nullno
yAxisobjectnoread by the command beside its listed parameters
yTitlestring | nullno

Call through doc_run

text
doc_run {
  "path": "<file>.docx",
  "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, series, seriesFormat, title, xAxis, xTitle, yAxis, 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": {
      "items": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          }
        ]
      },
      "type": "array"
    },
    "dataLabelPosition": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "dataLabels": {
      "type": "boolean"
    },
    "gridlines": {
      "type": "boolean"
    },
    "id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Inline"
      ]
    },
    "ids": {
      "description": "read by the command beside its listed parameters",
      "type": "array",
      "x-khp-types": [
        "Inline"
      ]
    },
    "kind": {
      "description": "chart type",
      "type": "string"
    },
    "legend": {
      "oneOf": [
        {
          "enum": [
            "top",
            "bottom",
            "left",
            "right",
            "topRight"
          ],
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "series": {
      "description": "[{name, values, color?}]",
      "items": {
        "additionalProperties": true,
        "properties": {
          "color": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "values": {}
        },
        "type": "object"
      },
      "type": "array"
    },
    "seriesFormat": {
      "additionalProperties": true,
      "description": "read by the command beside its listed parameters",
      "type": "object"
    },
    "title": {
      "oneOf": [
        {
          "description": "chart title",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "xAxis": {
      "additionalProperties": true,
      "description": "read by the command beside its listed parameters",
      "type": "object"
    },
    "xTitle": {
      "oneOf": [
        {
          "description": "horizontal axis title",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "yAxis": {
      "additionalProperties": true,
      "description": "read by the command beside its listed parameters",
      "type": "object"
    },
    "yTitle": {
      "oneOf": [
        {
          "description": "vertical axis title",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "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.