Extend DialectTheme with more chart types (area, donut, stacked bar, sparkline) #29
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
DialectTheme.baseOptions(String chartType)only branches on two types:Everything else falls through to the bare base options with no type-specific styling. In practice the app ships three chart classes:
LineChart,BarChart(both viaAxisChart) andPieChart.CLAUDE.md already states the rule — "Add new chart types here, not by duplicating option maps" — the architecture is ready, nobody has extended it.
Proposal
Add styled support for the types a dashboard actually needs:
PieChartvariant with a centre total label.plotOptions.bar.stacked, plus legend handling.Each new type gets its option fragment in
DialectTheme, and the corresponding component class extendsAxisChartorApexChartfollowing the existing pattern. Palette staysDialectTheme.COLORS— no per-chart colour literals.Acceptance criteria
applyThemeOverlay()path must cover them).DialectTheme.Scope
Medium, but cleanly splittable — one chart type per PR is a reasonable unit.