Carregando…
Carregando…
Carregando…Multi-series area chart with stacked mode, gradient, tooltip, grid and legend.
$ npx kikitocn add area-chart@/lib/utilsimport { AreaChart } from "@/components/ui/cn/area-chart/AreaChart";
export function AreaChartExample() {
return (
<AreaChart />
);
}| Prop | Tipo | Padrão | Descrição |
|---|---|---|---|
data* | AreaChartDataPoint[] | — | Array de pontos: { label, [seriesKey]: number } |
series* | AreaChartSeries[] | — | Séries: { key, label?, color? } |
height | number | 200 | Altura em px |
showGrid | boolean | true | Exibe linhas de grade |
showLegend | boolean | true | Exibe legenda das séries |
showTooltip | boolean | true | Exibe tooltip ao passar o mouse |
stacked | boolean | false | Empilha as séries |
gradient | boolean | true | Aplica gradiente vertical nas áreas |
Area Chart — gradient fills with hover tooltip