Chart Legend
Every legend layout from the chart kit, wired to real charts through one focus store.
$149 once · every Pro piece
Hover a row and the other series step back to a fifth of their strength everywhere; hover a line or a ring and its row lights up as a filled pill. Click a row to switch a series off: it fades out, the row goes ash with a hollow swatch and the axis tweens to what is left. Shift+click a row to lock the isolation; tap the legend or press Esc to let go (press-and-hold locking is an option). Rows are a roving keyboard group: arrows move, Enter toggles, Shift+Enter isolates. Layouts: a row, a list with rolling values and shares, progress rows on concentric rings, Less-to-More levels on a heat grid and a continuous gradient with a caret.
Install
npx shadcn@latest add @obsyde/chart-legendNeeds your licence key · Get Pro
Usage
Import it from where the CLI puts it, or copy the files below by hand.
import { ChartLegendDemo } from '@/components/obsyde/ember/chart-legend/ChartLegendDemo';
export function Example() {
return (
<ChartLegendDemo view="row" />
);
}
Files
What you get with Pro: plain React, TypeScript and CSS, with no dependencies.
ember/chart-legend/ChartLegendDemo.tsxcomponentember/chart-legend/chart-legend.cssstylesember/viz-kit/viz-kit.csssharedember/viz-kit/Tooltip.tsxsharedember/viz-kit/focus.tssharedember/viz-kit/patterns.tsxsharedember/viz-kit/roll.tssharedember/shared/rolling-number.csssharedember/shared/spring.tssharedember/shared/accent.tssharedember/viz-kit/scale.tssharedember/viz-kit/motion.tssharedember/viz-kit/chart.tsxsharedember/shared/ember.csssharedember/viz-kit/touch.tssharedember/viz-kit/keyboard.tssharedember/viz-kit/size.tssharedember/viz-kit/shape.tssharedember/viz-kit/series.tsxsharedember/viz-kit/Legend.tsxsharedember/viz-kit/Grid.tsxsharedember/viz-kit/demo.tsxsharedember/viz-kit/demo.csssharedember/viz-kit/Axis.tsxshared
API
| Prop | Type | Default |
|---|---|---|
accentAccent | 'ember' | 'volt' | 'arc' | 'ember' |
viewView | 'row' | 'list' | 'progress' | 'levels' | 'gradient' | 'row' |
markerMarker | 'dot' | 'line' | 'dash' | 'ring' | 'square' | 'pattern' | 'dot' |
toggleClick toggles | boolean | true |
holdHold also locks | boolean | false |
percentShow share | boolean | true |
seriesSeries | number | 4 |
curveCurve | 'catmull' | 'monotone' | 'linear' | 'step' | 'catmull' |
seedSeed | number | 4 |