Before you start
- Exploratory Desktop is running and the project is open (Choose a project). Check with expl status.
- You know the id of the data frame and its column names (expl dataframe list and expl dataframe get-schema <dataframe_id>).
- chart add and chart edit work only when Allow create, edit and delete is on in System Settings > MCP / CLI. They do not ask for confirmation; deleting a chart does. See Confirmation and long-running operations.
Steps
1. Look up the settings of the chart type
--marker is the type of the chart: bar, line, area, pie, scatter, pivot, singlevalue, table and so on. Without --section, the result is a table of contents of the settings.
--setting <name> looks up one setting exactly, and --search <part of a name> narrows by part of a name. Do not guess setting names; only the names returned here work.
2. Create the chart
--marker and --axes are required. --axes is a JSON object that puts a column in each slot, with the slot name as the key. The slots of bar and line charts are x, y, color and facet; those of a pivot table are rowh, colh and meas. The value is a column name, or {"column": "...", "func": "sum"} to choose the aggregation.
--settings takes a JSON object of the names from step 1 (an on/off setting is the string “on” or “off”, not true or false), and --filters takes the list of filter conditions. The conditions are described in expl chart add --help.
The result carries the id of the new chart (chartId). Without --data-frame-id, the data frame selected in Desktop is used; if none is selected, it stops with NO_DATA_FRAME.
3. Check the numbers and the image
4. Change it
Pass only what changes. What you leave out stays. The id does not change.--axes, --settings and --filters work the same way as in chart add. --run runs the chart when Auto Run is off.
If it fails
For the arguments of any command, run
expl <command> --help or expl tools describe "<command>".
