Charts / React basic charts / Comparison
Bars on the left axis and a line on the right axis, for two measures in different units that should be read together.
React component ComboChart, data through props. Side by side: who, which source, which version is ahead. Tags: combo, dual axis, bar and line, revenue, margin, mixed, comparison.
npm i klar-charts
import 'klar-charts/styles.css'
import { ThemeScope, ComboChart } from 'klar-charts'
# or copy the source:
npx shadcn@latest add https://klar.run/r/basic-combo.json<ComboChart data={revenueAndMargin} barLabel="Revenue" lineLabel="Gross margin" unit="currency" lineUnit="percent" barColor="var(--blue)" lineColor="var(--orange)" height={372} ariaLabel="Monthly revenue with gross margin, fiscal 2026" />