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
| Name | Type | Required | Description |
|---|---|---|---|
categories | (string | number)[] | no | |
dataLabelPosition | string | no | read by the command beside its listed parameters |
dataLabels | boolean | no | |
gridlines | boolean | no | |
id | integer | string | no | |
ids | any[] | no | read by the command beside its listed parameters |
kind | string | no | chart type |
legend | "top" | "bottom" | "left" | "right" | "topRight" | null | no | |
series | object[] | no | [{name, values, color?}] |
seriesFormat | object | no | read by the command beside its listed parameters |
title | string | null | no | |
xAxis | object | no | read by the command beside its listed parameters |
xTitle | string | null | no | |
yAxis | object | no | read by the command beside its listed parameters |
yTitle | string | null | no |
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.