Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,14 @@ formo charts create --board-id brd_123 --title "Daily Active Users" \
--x-axis date --y-axis users

formo charts create --board-id brd_123 --body '{"title":"Recent Events","chart_type":"table","query":"SELECT * FROM events LIMIT 10"}'

formo charts create --board-id brd_123 --title "Post-connect paths" \
--chart-type user_paths \
--settings '{"anchors":[{"type":"event","event":"connect"}],"maxSteps":5,"nodesPerStep":3}'
```

### `charts update <chartId> --board-id <boardId> [options]`
Update a chart. Accepts the same options as `create`: a raw `--body '<json>'` and/or typed flags (`--title`, `--chart-type`, `--query`, `--description`, `--x-axis`, `--y-axis`, `--group-by`, `--steps`, `--settings`). Typed flags override matching `--body` keys.
Update a chart. Accepts the same options as `create`: a raw `--body '<json>'` and/or typed flags (`--title`, `--chart-type`, `--query`, `--description`, `--x-axis`, `--y-axis`, `--group-by`, `--steps`, `--settings`). `--steps` is for funnel steps. User Paths use `--settings` with `anchors` and optional `maxSteps` / `nodesPerStep`; retention settings require an `entryFilter` key. Typed flags override matching `--body` keys.

```bash
formo charts update chart_abc123 --board-id brd_123 --title "Renamed chart"
Expand Down
3 changes: 2 additions & 1 deletion SKILLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@ formo charts create --board-id <boardId> [--body '<json>' | typed chart options]
| `--chart-type` | `table`, `number`, `funnel`, `bar`, `line`, `area`, `pie`, `stacked`, `user_paths`, `retention` |
| `--query` | SQL query for SQL-backed charts |
| `--x-axis` / `--y-axis` / `--group-by` | Chart encodings |
| `--steps` / `--settings` | JSON for funnel/user-path/retention chart settings |
| `--steps` | JSON array of funnel steps |
| `--settings` | JSON settings object. User Paths require `anchors` and accept `maxSteps` / `nodesPerStep`; retention requires an `entryFilter` key |

> Requires `boards:write` scope.

Expand Down
6 changes: 4 additions & 2 deletions src/commands/charts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,13 @@ const chartBodyOptions = z.object({
steps: z
.string()
.optional()
.describe('JSON array of funnel/user-path step objects'),
.describe('JSON array of funnel step objects'),
settings: z
.string()
.optional()
.describe('JSON object of type-specific chart settings'),
.describe(
'JSON object of type-specific chart settings (for example, user_paths anchors/maxSteps/nodesPerStep or retention entryFilter/retentionFilter)',
),
})

// ── List charts for a board ──
Expand Down