Theming

shadcn-echarts reads your CSS variables and registers matching ECharts themes.

Default behavior

Force theme mode

import { BarChart } from "@devstool/shadcn-echarts"

<BarChart
  theme="dark"
  option={{
    xAxis: { type: "category", data: ["Mon", "Tue", "Wed"] },
    yAxis: { type: "value" },
    series: [{ type: "bar", data: [20, 40, 15] }]
  }}
/>

Important CSS tokens