create_chart
Create a chart from an existing dataset. Specify dataset ID, title, viz type, and metrics; optionally attach to dashboards or preview with dry run.
Instructions
Create a chart from an existing dataset.
Recommended workflow: create_dataset → create_chart (with dashboards param to attach it). Use list_datasets to find dataset_id and list_dashboards to find dashboard IDs.
Args: dataset_id: ID of the dataset to visualize title: Chart title viz_type: Visualization type (e.g. "echarts_timeseries_bar", "pie", "big_number_total", "table") metrics: Metric names or ad-hoc metric objects groupby: Columns to group by time_column: Time column for time-series charts template: Defaulting strategy for missing chart fields ('auto' or 'minimal') params_json: Optional JSON object to merge into chart params dashboards: Dashboard IDs to attach this chart to validate_after_create: Run chart-data validation after create repair_dashboard_refs: Attempt to repair stale dashboard chart references when dashboards are provided. Defaults to False so create_chart does not mutate dashboard layouts unless explicitly requested. dry_run: If True, validate inputs and return a preview without making any changes (default: False)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dataset_id | Yes | ||
| title | Yes | ||
| viz_type | Yes | ||
| metrics | No | ||
| groupby | No | ||
| time_column | No | ||
| template | No | auto | |
| params_json | No | ||
| dashboards | No | ||
| validate_after_create | No | ||
| repair_dashboard_refs | No | ||
| dry_run | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |