Function: planToEchartsOption()
planToEchartsOption(
plan,fallbackTitle,brand?):Record<string,unknown>
Expand a ChartPlan into a full Echarts EChartsOption
JSON. Centralized here so the planner agent only fills in the
compact plan shape; tooltip / animation / color / grid defaults
stay consistent across charts and are easy to tune without
retraining model behaviour.
When brand is set, the resolved spec is themed with the brand’s series
color cycle and base text style (see brandChartTheme); otherwise
Echarts’ defaults apply.
Parameters
Section titled “Parameters”categories?
Section titled “categories?”string[] = ...
chartType
Section titled “chartType”"custom" | "bar" | "horizontalBar" | "line" | "area" | "combo" | "waterfall" | "scatter" | "heatmap" | "radar" | "pie" | "funnel" | "treemap" = wire.ChartTypeSchema
option?
Section titled “option?”string = ...
series
Section titled “series”object[] = ...
title?
Section titled “title?”string = ...
xAxisLabel?
Section titled “xAxisLabel?”string = ...
yAxisLabel?
Section titled “yAxisLabel?”string = ...
yCategories?
Section titled “yCategories?”string[] = ...
fallbackTitle
Section titled “fallbackTitle”string
brand?
Section titled “brand?”assets
Section titled “assets”{ favicon: string; icon: { dark?: string; light: string; }; logo: { dark?: string; light: string; }; } = ...
assets.favicon
Section titled “assets.favicon”string = ...
assets.icon
Section titled “assets.icon”{ dark?: string; light: string; } = ...
assets.icon.dark?
Section titled “assets.icon.dark?”string = ...
assets.icon.light
Section titled “assets.icon.light”string = ...
assets.logo
Section titled “assets.logo”{ dark?: string; light: string; } = ...
assets.logo.dark?
Section titled “assets.logo.dark?”string = ...
assets.logo.light
Section titled “assets.logo.light”string = ...
colors
Section titled “colors”{ accent: string; background: string; border: string; foreground: string; muted: string; primary: string; primaryHover: string; surface: string; } = BrandColorsSchema
colors.accent
Section titled “colors.accent”string = ...
colors.background
Section titled “colors.background”string = ...
colors.border
Section titled “colors.border”string = ...
colors.foreground
Section titled “colors.foreground”string = ...
colors.muted
Section titled “colors.muted”string = ...
colors.primary
Section titled “colors.primary”string = ...
colors.primaryHover
Section titled “colors.primaryHover”string = ...
colors.surface
Section titled “colors.surface”string = ...
description
Section titled “description”string = ...
extensions
Section titled “extensions”Record<string, unknown> = ...
{ documentation?: string; repository?: string; website?: string; } = ...
links.documentation?
Section titled “links.documentation?”string = ...
links.repository?
Section titled “links.repository?”string = ...
links.website?
Section titled “links.website?”string = ...
string = ...
schemaVersion
Section titled “schemaVersion”"1" = ...
shortName
Section titled “shortName”string = ...
tagline
Section titled “tagline”string = ...
typography
Section titled “typography”{ mono: string; sans: string; } = ...
typography.mono
Section titled “typography.mono”string = ...
typography.sans
Section titled “typography.sans”string = ...
{ audience: string[]; avoid: string[]; principles: string[]; tone: string[]; } = BrandVoiceSchema
voice.audience
Section titled “voice.audience”string[] = ...
voice.avoid
Section titled “voice.avoid”string[] = ...
voice.principles
Section titled “voice.principles”string[] = ...
voice.tone
Section titled “voice.tone”string[] = ...
Returns
Section titled “Returns”Record<string, unknown>