Charts / React basic charts / Comparison
Rows with a chart per column type: in-cell bars, deltas, sparklines, heat cells, badges and progress, with sortable sticky headers, a totals row and windowing for long lists.
React component DataTable, data through props. Side by side: who, which source, which version is ahead. Tags: table, grid, sparkline, heatmap cell, sortable, in-cell bar, leaderboard, report.
npm i klar-charts
import 'klar-charts/styles.css'
import { ThemeScope, DataTable } from 'klar-charts'
# or copy the source:
npx shadcn@latest add https://klar.run/r/basic-data-table.json<DataTable
key={m}
rows={many ? manyRegions : regions}
columns={regionColumns}
rowKey={(r) => r.region}
defaultSort={{ key: 'revenue', dir: 'desc' }}
totals
maxHeight={many ? 520 : undefined}
density={many ? 'compact' : 'comfortable'}
ariaLabel="Sales by region, quarter to date"
/>