Composed Chart
Documentation Index
Fetch the complete documentation index at: /llms.txt. Use this file to discover all available pages before exploring further.
Simple static & beautifully designed composed charts combining bars and lines
Installation
Usage
The composed chart is composible. <BeeComposedChart> is the container, and you compose only the parts you need — <Grid>, <XAxis>, <YAxis>, <Legend>, <Tooltip>, and one or more <Bar> and <Line> — as its children.
import {
BeeComposedChart,
Bar,
Line,
XAxis,
YAxis,
Grid,
Tooltip,
Legend,
} from "@/components/beecharts/charts/composed-chart";const chartConfig = {
desktop: {
label: "Desktop",
colors: { light: ["#047857"], dark: ["#10b981"] },
},
mobile: {
label: "Mobile",
colors: { light: ["#be123c"], dark: ["#f43f5e"] },
},
} satisfies ChartConfig;
<BeeComposedChart xDataKey="month" data={data} config={chartConfig} barRadius={8}>
<Grid />
<XAxis dataKey="month" />
<YAxis />
<Legend />
<Tooltip />
<Bar dataKey="desktop" />
<Line dataKey="mobile" curveType="monotone" />
</BeeComposedChart>The basic preview matches bar and line: twelve months, desktop bars, mobile line, same emerald/rose tokens, and the same default 8px top corner radius on bars (barRadius / DEFAULT_BAR_RADIUS).
Loading State
The composed chart supports loading state with a shimmer animation. You can pass the isLoading prop to the chart to show the loading state while your data is being fetched.
Examples
Pareto
Use prepareParetoData() from Chart recipes, then bar + line on <BeeComposedChart /> with left/right Y axes. Pareto uses its own category data (not the traffic dataset above).
Box plot
Stack iqrFloor + iqr bars with median markers (<Line variant="points" />) — data from prepareBoxPlotRow() per category. Hide the positioning floor from the legend (showInLegend={false} on iqrFloor). Whiskers (min / max) are optional; this recipe shows the IQR box and median only.
More examples
Variant and glow previews from the Recharts-era docs are being ported to ECharts.
API Reference
The chart is composed of several parts. The props below are grouped by the component they belong to.
The root container. It owns the data, the shared selection state, the loading skeleton, and the optional brush. Everything visual is composed as its children.
A single bar series. Each <Bar /> is self-contained and generates its own gradient/pattern definitions, so a chart can hold any number of bars — each with its own variant, glow, and clickability.
A single line series. Each <Line /> is self-contained and generates its own color gradient and glow filter, so a chart can hold any number of lines — each with its own stroke, curve, glow, and clickability.
Point markers composed inside a <Line />. <Dot /> is the resting marker; <ActiveDot /> is the hovered marker. They render nothing on their own — the parent <Line /> reads their variant.
The category and value axes. Both ship with the chart's flat default styling and forward every Recharts axis prop, so dataKey, tickFormatter, tickMargin, etc. pass straight through. They are hidden automatically while the chart is loading.
The background grid lines. Defaults to horizontal-only dashed lines and forwards every Recharts CartesianGrid prop.
The hover tooltip. It reads the chart's selection state so its content dims unselected series.
The series legend. When isClickable is set, each entry toggles selection of its series.