Skip to content

Strata

A stacked area chart you can take apart.

$149 once · every Pro piece

Customize

Point at a layer to make it live: its top line brightens while the others step back, and the header rolls to its value and share. Click it, or pick it with Up and Down and press Enter, to isolate it (now it carries the accent): the others collapse to the baseline, it drops to sit on the baseline and the axis re-fits, all in one motion because both edges of every band tween together. Escape restores. Stack the values, show them as shares of 100%, or centre them as a stream; fill the layers with graded greys, a texture per layer or a fade. Optional extras: a legend row or a list with rolling values and shares (hover isolates both ways, click hides, hold locks), dashed min, max and average lines over the total, a threshold past which the top of the stack runs hot, event badges, a floating or corner tooltip, and loading and empty states.

Install

npx shadcn@latest add @obsyde/strata

Needs your licence key · Get Pro

Usage

Import it from where the CLI puts it, or copy the files below by hand.

import { Strata } from '@/components/obsyde/ember/strata/Strata';

export function Example() {
  return (
    <Strata />
  );
}

Files

What you get with Pro: plain React, TypeScript and CSS, with no dependencies.

  • ember/strata/Strata.tsxcomponent
  • ember/strata/strata.cssstyles
  • ember/strata/StrataDemo.tsxdemo
  • ember/viz-kit/viz-kit.cssshared
  • ember/viz-kit/Tooltip.tsxshared
  • ember/viz-kit/focus.tsshared
  • ember/viz-kit/patterns.tsxshared
  • ember/viz-kit/roll.tsshared
  • ember/shared/rolling-number.cssshared
  • ember/shared/spring.tsshared
  • ember/shared/accent.tsshared
  • ember/viz-kit/scale.tsshared
  • ember/viz-kit/motion.tsshared
  • ember/viz-kit/chart.tsxshared
  • ember/shared/ember.cssshared
  • ember/viz-kit/touch.tsshared
  • ember/viz-kit/keyboard.tsshared
  • ember/viz-kit/size.tsshared
  • ember/viz-kit/States.tsxshared
  • ember/viz-kit/shape.tsshared
  • ember/viz-kit/series.tsxshared
  • ember/viz-kit/Legend.tsxshared
  • ember/viz-kit/Grid.tsxshared
  • ember/viz-kit/Axis.tsxshared
  • ember/viz-kit/annotations.tsxshared

API

PropTypeDefault
accentAccent'ember' | 'volt' | 'arc''ember'
seriesSeriesnumber4
offsetOffset'stacked' | 'percent' | 'stream''stacked'
fillFill'solid' | 'pattern' | 'gradient''solid'
legendLegend'none' | 'row' | 'list''none'
unitUnitstring—
refLinesReference lines'none' | 'min-max' | 'avg' | 'median' | 'all''none'
thresholdThreshold'none' | 'above' | 'below''none'
thresholdValueThreshold valuenumber120
annotationsAnnotationsbooleanfalse
readoutReadout'corner' | 'tooltip''corner'
showAxisAxesbooleantrue
tooltipTooltip'none' | 'panel' | 'corner''none'
crosshairCrosshair'solid' | 'dashed' | 'gradient' | 'none''solid'
backgroundBackground'grid' | 'dots' | 'hatch' | 'none''grid'
curveCurve'monotone' | 'linear' | 'catmull' | 'step''monotone'
revealReveal'rise' | 'sweep' | 'fade' | 'none''rise'
statusStatus'ready' | 'loading' | 'empty''ready'
heightHeightnumber240
pointsPointsnumber40
seedSeednumber7