Skip to content

Type Alias: Chart

Chart = z.infer<typeof ChartSchema>

Pollable chart-cache entry representing pending, successful, or failed planning.

  • chartId: Opaque id minted by the chart subsystem. Embed verbatim as [chart:<chartId>] in agent prose; the host UI resolves it against this cache entry.
  • error (optional): Error message when the chart failed (data fetch error, planner error, empty dataset). Mutually exclusive with result; absent on success and while processing.
  • result (optional): Resolved chart plan. Absent while processing and when the run errored.
  • result.chartType: The chart shape that best matches the data and intent.
  • result.option: Fully-resolved Echarts EChartsOption JSON for this chart - drop directly into an Echarts instance (or <ReactECharts option={...} />) without further processing. Includes title / tooltip / legend / grid / axis / series defaults already merged in.