Charts: create
charts_createCreate and save a chart for entity records, platform usage metrics, or plan quotas, with filters and aggregation. Charts stay hidden until added to a dashboard.
Instructions
Create a chart. Check it first with charts preview. Saves a chart that plots an entity's records, a platform usage metric (see charts_platform_metrics) or a plan quota. Settings are checked first and the call is refused with the problems listed. The new chart isn't shown anywhere until you put it on a dashboard with dashboards_add_chart or dashboards_create. Returns JSON.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End of a custom time window, e.g. 2026-03-31 | |
| agg | No | How to combine the --measure values: count (default), sum, avg, min or max | |
| from | No | Start of a custom time window, e.g. 2026-01-01 | |
| name | Yes | Chart name | |
| sort | No | Sort direction: asc or desc | |
| type | No | Chart type: column (bar chart), line, pie, area, stat, gauge or funnel | |
| limit | No | Most points or rows to plot | |
| config | No | Other chart settings as a JSON object, e.g. {"limit":10,"target":500} or funnelStages for a funnel. Typed options win over this. Setting names can be camelCase or snake_case | |
| entity | No | Entity whose records the chart plots (for an entity chart) | |
| filter | No | Filter as field:operator:value, e.g. status:eq:published. Operators: eq, ne, gt, gte, lt, lte, contains, in, exists, not_exists. Repeat for several fields. Replaces the chart's existing filters | |
| source | No | Where the data comes from: entity (default), platform (usage metrics) or quota (plan limits) | |
| target | No | Goal or warning level drawn on a stat or gauge | |
| compare | No | Compare with the previous period (true/false) | |
| measure | No | Numeric field to aggregate (needed unless --agg is count) | |
| group_by | No | Field for the x axis, or the slices of a pie. A date field is bucketed with --interval | |
| interval | No | Bucket size for a date --group-by: hour, day, week, month, quarter or year | |
| stack_by | No | Field that splits each bar or point into a second breakdown | |
| timeframe | No | Time window: all, 24h, 7d, 30d, 90d, 365d or custom | |
| cumulative | No | Plot a running total (true/false) | |
| target_mode | No | What --target means: goal or warning | |
| compare_days | No | How many days back the comparison period starts (defaults to the length of the time window) | |
| quota_metric | No | Plan limit for a quota chart: storage, files, users, workflows or emails | |
| compare_overlay | No | Draw the previous period over the current one (true/false) | |
| platform_metric | No | Usage metric for a platform chart. List them with: charts platform-metrics | |
| platform_period | No | Window for a platform metric: day, week, month, quarter or year |