data/@mihcm/ui·v0.21.0·stable
SparkChart
Small D3-backed trend chart for dense KPI rows, table cells, and dashboard cards.
Live preview
Adjust the controls on the right; the preview and code update in real time.
example.tsxtsx
import { SparkChart } from '@mihcm/ui/SparkChart';
export function Example() {
return (
<SparkChart
tone="primary"
areaTone="primary"
dotTone="primary"
showArea
showDots
height="56"
></SparkChart>
);
}Install
Both paths are valid. CLI ships the source into your repo (you own it). Install pins via npm.
npx @mihcm/cli add SparkChartCopies the source into
components/ds/SparkChart.tsx. You own the file. Use --out to override the directory or --force to overwrite.