Slope Chart
Two or three periods joined by straight lines, one per category.
$149 once · every Pro piece
Direction lives in luminance, not hue: risers are bone, fallers sink to grey, and the biggest mover is the one line in the accent with a soft bloom. Labels sit on both sides with the value and the change, pushed apart so none collide, with a short leader where one had to move. Point at a line or a label and it holds while the rest step back to a fifth; a panel beside it reads each period and the change. Arrow up and down walk the categories from the keyboard; left and right step through the periods.
Install
npx shadcn@latest add @obsyde/slope-chartNeeds your licence key · Get Pro
Usage
Import it from where the CLI puts it, or copy the files below by hand.
import { SlopeChart } from '@/components/obsyde/ember/slope-chart/SlopeChart';
export function Example() {
return (
<SlopeChart
periods="2"
mover="relative"
labels="both"
tooltip="panel"
dots="halo"
/>
);
}
Files
What you get with Pro: plain React, TypeScript and CSS, with no dependencies.
ember/slope-chart/SlopeChart.tsxcomponentember/slope-chart/slope-chart.cssstylesember/slope-chart/SlopeChartDemo.tsxdemoember/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/States.tsxsharedember/viz-kit/shape.tssharedember/viz-kit/Grid.tsxsharedember/viz-kit/demo.tsxsharedember/viz-kit/demo.cssshared
API
| Prop | Type | Default |
|---|---|---|
accentAccent | 'ember' | 'volt' | 'arc' | 'ember' |
periodsPeriods | '2' | '3' | '2' |
moverAccent mover | 'relative' | 'absolute' | 'none' | 'relative' |
labelsLabels | 'both' | 'end' | 'both' |
tooltipTooltip | 'panel' | 'none' | 'panel' |
crosshairCrosshair | 'none' | 'solid' | 'dashed' | 'gradient' | 'none' |
dotsDots | 'halo' | 'ring' | 'none' | 'halo' |
backgroundBackground | 'none' | 'grid' | 'dots' | 'hatch' | 'none' |
revealReveal | 'sweep' | 'cool' | 'rise' | 'fade' | 'none' | 'sweep' |
statusStatus | 'ready' | 'loading' | 'empty' | 'ready' |
heightHeight | number | 340 |
pointsCategories | number | 8 |
seedSeed | number | 4 |