On this page
Kater CLI Present and share chart
kater chart edit
Changes a saved chart by what you did to it, not by the whole chart.
Give the commands in the order to apply them and the revision you read. The server works out the chart’s file, so the same commands leave the same file whoever sends them. The commands are one change in the chart’s history: the answer names it in change, and kater undo takes it back. The command refuses the change when the chart changed after you read it, and nothing is written.
Examples
# Keep the spend_mix chart in a filekater chart read connections/snowflake_prod_connection/workspaces/ad_reporting/spend_mix --json > spend_mix_read.json# Make it a bar chart, titled by what it showsjq '{expected_revision: .definition.revision, commands: [{type: "set-kind", kind: "bar"}, {type: "set-title", label: "Spend by platform"}]}' spend_mix_read.json > spend_mix_edit.json# Apply both commands as one changekater chart edit connections/snowflake_prod_connection/workspaces/ad_reporting/spend_mix --request-file spend_mix_edit.jsonArguments
Options
It also takes the global options anywhere on the line, and --help.
The request
| Field | What it holds |
|---|---|
commands | What was done, each one an object whose type says which, applied in order. The chart is checked after the last one, so a change of kind may be followed by the commands that fill the new kind’s roles. |
expected_revision | The chart’s revision from kater chart read. |
The commands
type | What it does |
|---|---|
set-title, set-description | Sets the chart’s label or description. null takes it away. |
set-presentation | Sets the chart’s look: presentation, an object of the settings to change. {"legend": false} hides the legend. A setting with a null value is taken away. |
reset-presentation | Takes away the settings named in keys, or all of them when keys is left out. |
set-kind | Makes the chart another kind. Each role that the new kind shares keeps its fields, each value keeps the settings the new kind reads, and the chart keeps the settings the new kind lists as controls, such as a series’ colours. |
set-bindings | Puts the bindings in a role, such as category, values or tooltip. A field has one place on the chart: put in this role, it leaves the role it held. |
set-series | Sets the own options of the value at index: label, mark, point, axis and stack. |
set-template | Sets the words of a Text chart. |
repoint | Makes the chart read another query, the source. |
hide-column, show-column | Hides a table’s column, or shows it again as the last one. The chart still reads every row of its query. |
remove-gone-fields | Repairs a chart that reads a field its query no longer has: the chart stops reading the field, and loses its filter and its sort on it. kater chart read answers the chart’s cause, with repair where this command can save the chart. Every other command on such a chart is refused. |
The answer holds the chart’s definition, its problems, the change and before_text, the chart’s file as it was before.