Sheet kit command
chart.set
Chart Properties
Changes a chart's properties in one call: type, title, legend, data labels, gridlines, style, axis titles, position and size, and a waterfall's totals.
- Kit
- Sheet 0.1.0 (.xlsx (and opens .xlsm, .xls, .xltx, .csv, .ods, .xlsb))
- Changes the document
- yes
- Acts on
chart(one id), which a run step’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
at | string | no | the top-left cell in A1 notation such as C3 |
chart | integer | string | no | |
dataLabels | any | no | |
dx | number | no | |
dy | number | no | |
gridlines | any | no | |
height | number | no | |
legend | "none" | "bottom" | "top" | "left" | "right" | no | |
style | integer | no | a chart style number, clamped to 1 through 16 |
title | string | no | |
totals | integer[] | no | a waterfall's points (by index from 0) set as totals; [] sets none |
type | string | no | a chart type such as column, bar, line, pie |
width | number | no | |
xTitle | string | no | |
yTitle | string | no |
Call through sheet_run
text
sheet_run {
"path": "<file>.xlsx",
"steps": [{ "command": "chart.set" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: at, chart, dataLabels, dx, dy, gridlines, height, legend, style, title, totals, type, width, xTitle, yTitle. sheet_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": {
"at": {
"description": "the top-left cell in A1 notation such as C3",
"type": "string"
},
"chart": {
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-khp-types": [
"Chart"
]
},
"dataLabels": {},
"dx": {
"type": "number"
},
"dy": {
"type": "number"
},
"gridlines": {},
"height": {
"type": "number"
},
"legend": {
"enum": [
"none",
"bottom",
"top",
"left",
"right"
],
"type": "string"
},
"style": {
"description": "a chart style number, clamped to 1 through 16",
"type": "integer"
},
"title": {
"type": "string"
},
"totals": {
"description": "a waterfall's points (by index from 0) set as totals; [] sets none",
"items": {
"type": "integer"
},
"type": "array"
},
"type": {
"description": "a chart type such as column, bar, line, pie",
"type": "string"
},
"width": {
"type": "number"
},
"xTitle": {
"type": "string"
},
"yTitle": {
"type": "string"
}
},
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (sheet_commands through @kition/[email protected], built from KitionAI/kition-sheet@82f13b2). As data: commands.jsonl.