Variable: chartPlanSchema
constchartPlanSchema:ZodObject<{categories:ZodOptional<ZodArray<ZodString>>;chartType:ZodUnion<readonly [ZodLiteral<"bar">,ZodLiteral<"horizontalBar">,ZodLiteral<"line">,ZodLiteral<"area">,ZodLiteral<"combo">,ZodLiteral<"waterfall">,ZodLiteral<"scatter">,ZodLiteral<"heatmap">,ZodLiteral<"radar">,ZodLiteral<"pie">,ZodLiteral<"funnel">,ZodLiteral<"treemap">,ZodLiteral<"custom">]>;option:ZodOptional<ZodString>;series:ZodDefault<ZodArray<ZodObject<{data:ZodArray<ZodCatch<ZodPipe<ZodTransform<… | … | … | …,unknown>,ZodUnion<readonly […, …, …, …]>>>>;name:ZodString;type:ZodOptional<ZodUnion<readonly [ZodLiteral<"bar">,ZodLiteral<"line">,ZodLiteral<"area">]>>;yAxisIndex:ZodOptional<ZodUnion<readonly [ZodLiteral<0>,ZodLiteral<1>]>>; },$strip>>>;title:ZodOptional<ZodString>;xAxisLabel:ZodOptional<ZodString>;yAxisLabel:ZodOptional<ZodString>;yCategories:ZodOptional<ZodArray<ZodString>>; },$strip>
Compact, model-friendly representation of an Echarts spec. The
planner agent emits this; planToEchartsOption expands it
into a real EChartsOption JSON. Two layers because letting the
model fill in a fully-typed EChartsOption is brittle (hundreds
of optional fields, deep unions, version-dependent shapes). A
small “chart plan” schema is much more reliable for a fast model
and keeps animation / tooltip / styling defaults consistent
across charts.