Skip to content

Density Plot

Smooth kernel-density curves, overlaid on one baseline or stacked as ridges that occlude the row behind.

$149 once · every Pro piece

Customize

The area under each curve is an ordered dither whose ink is the density itself: the peak is near-solid, the tails thin to scattered dots, and there are no edge lines. Gradient and pattern fills are there too. Each curve carries its median and interquartile range on its baseline, the crosshair reads the share of samples below the pointer, and a narrow / auto / wide bandwidth switch morphs every curve over 500ms. The legend isolates and toggles curves; the y range tweens to what is left.

Install

npx shadcn@latest add @obsyde/density-plot

Needs your licence key · Get Pro

Usage

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

import { DensityPlot } from '@/components/obsyde/ember/density-plot/DensityPlot';

export function Example() {
  return (
    <DensityPlot mode="overlay" shading="dither" />
  );
}

Files

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

  • ember/density-plot/DensityPlot.tsxcomponent
  • ember/density-plot/density-plot.cssstyles
  • ember/density-plot/DensityPlotDemo.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/Legend.tsxshared
  • ember/viz-kit/Grid.tsxshared
  • ember/viz-kit/demo.tsxshared
  • ember/viz-kit/demo.cssshared
  • ember/viz-kit/Axis.tsxshared

API

PropTypeDefault
accentAccent'ember' | 'volt' | 'arc''ember'
modeMode'overlay' | 'ridge''overlay'
shadingShading'dither' | 'gradient' | 'pattern' | 'none''dither'
bandwidthBandwidthnumber1
markersMedian & IQRbooleantrue
seriesSeriesnumber3
legendLegend'row' | 'none''row'
tooltipTooltip'panel' | 'none''panel'
crosshairCrosshair'none' | 'solid' | 'dashed' | 'gradient''none'
backgroundBackground'grid' | 'dots' | 'hatch' | 'none''grid'
revealReveal'sweep' | 'cool' | 'rise' | 'fade' | 'none''sweep'
statusStatus'ready' | 'loading' | 'empty''ready'
heightHeightnumber280
seedSeednumber2