mimic_build_chart
Build complete charts (bar, line, donut, radar) in a single call—container, visualization, labels, grid, legend, bound to DS variables. Replaces 30-50 hand-building steps with one API call.
Instructions
Bulk chart builder — creates an entire chart in ONE call: container, visualization (native rectangles or stroke-free SVG), axis labels, grid lines, and legend, all bound to DS variables and text styles. Use for ANY HTML chart instead of hand-building; reduces 30-50 tool calls to 1. chartType: bar, line, donut, radar. Key params: parentId, chartType, title, data, dimensions, colors (neutral DS data palette — never Brand/Success/Warning/Error). Use mimic_compute_chart for geometry-only. Phase 2+.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Chart data points. Bar: [{label, value}]. Donut: [{label, value}]. Line: [{label, value}] or [{x, y}]. Radar: [{label, value}] or [{label, values: [v1, v2]}] for multi-series. | |
| title | Yes | Chart card title text. | |
| colors | No | DS color variable paths for data elements. Falls back to DS cache palette or default. | |
| parentId | Yes | Parent node ID to insert the chart into. | |
| chartType | Yes | The type of chart to build. | |
| gridColor | No | DS variable path for grid lines. Falls back to DS cache border/secondary match. | |
| dimensions | Yes | Chart dimensions. Bar: {chartHeight, chartWidth?}. Donut: {outerRadius, innerRadius}. Line: {plotWidth, plotHeight}. Radar: {radius}. Optional for bar/line: yPrefix, ySuffix. | |
| labelColor | No | DS variable path for axis label text color. Falls back to DS cache text/tertiary match. | |
| labelStyle | No | DS text style name for axis labels. Falls back to smallest text style in DS cache. | |
| titleColor | No | DS variable path for title text color. Falls back to DS cache text/primary match. | |
| titleStyle | No | DS text style name for chart title. Falls back to DS cache sm/Semibold match. | |
| seriesNames | No | Legend labels for multi-series charts (e.g. ["Current", "Target"]). For donut charts, legend is auto-generated from data labels. |