Skip to content

Scrub Bars

A bar chart you read by dragging across it.

$149 once · every Pro piece

Customize

One bar is lit in the accent, one big number follows it with heavier digits in the higher places, and a dashed line at its height brightens every bar that rises above it while the rest step back. Press and drag to sum a span: the column stays lit and the header reads the range, its sum and the change. Shift with the arrows jumps between the high, the low and crossings. Bars land on springs that get heavier with their value. Optional extras: dashed min, max and average lines with pills, a threshold past which bars run hot, event badges, the previous period as dashed outlines or side-by-side hatched bars with the change beside the number, a profit-and-loss run around zero, textured bars, value labels, a floating tooltip, and loading and empty states.

Install

npx shadcn@latest add @obsyde/scrub-bars

Needs your licence key · Get Pro

Usage

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

import { ScrubBars } from '@/components/obsyde/ember/scrub-bars/ScrubBars';

export function Example() {
  return (
    <ScrubBars bars={24} />
  );
}

Files

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

  • ember/scrub-bars/ScrubBars.tsxcomponent
  • ember/scrub-bars/scrub-bars.cssstyles
  • ember/scrub-bars/ScrubBarsDemo.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/Grid.tsxshared
  • ember/viz-kit/Brush.tsxshared
  • ember/viz-kit/Axis.tsxshared
  • ember/viz-kit/annotations.tsxshared

API

PropTypeDefault
accentAccent'ember' | 'volt' | 'arc''ember'
labelLabelstring'Total'
unitUnitstring—
barsBarsnumber24
labelsBar labelsstring—
scrubLineScrub linebooleantrue
refLinesReference lines'none' | 'min-max' | 'avg' | 'median' | 'all''none'
thresholdThreshold'none' | 'above' | 'below''none'
thresholdValueThreshold valuenumber180
annotationsAnnotationsbooleanfalse
compareComparebooleanfalse
compareStyleCompare style'outline' | 'bars''outline'
negativeProfit / lossbooleanfalse
readoutReadout'corner' | 'tooltip''corner'
radiusCorner radiusnumber3
showAxisAxesbooleantrue
patternPattern'none' | 'diagonal-up' | 'diagonal-down' | 'dots' | 'vertical' | 'crosshatch''none'
backgroundBackground'grid' | 'dots' | 'hatch' | 'none''grid'
revealReveal'sweep' | 'cool' | 'fade' | 'none''sweep'
statusStatus'ready' | 'loading' | 'empty''ready'
valueLabelsValue labelsbooleanfalse
heightHeightnumber220
seedSeednumber3