Slope chart
CoreBefore and after on two axes: lines draw in, rank moves sit beside each value, and switching datasets slides every line to its new slope.
pnpm dlx shadcn@latest add https://wui.alann.works/r/slope-chart.jsonAPI Reference
| Prop | Type | Default |
|---|---|---|
data* | SlopeItem[] | required |
label* | string | required |
startLabel* | string | required |
endLabel* | string | required |
formatValue | (value: number) => string | — |
formatChange | (change: number, item: SlopeItem) => string | — |
height | number | — |
highlightKey | string | null | — |
activeKey | string | null | — |
onActiveChange | (key: string | null) => void | — |
ranks | boolean | — |
emptyLabel | string | — |
ref | Ref<HTMLElement> | — |
className | string | — |