docs/components/display/WaterfallChart

WaterfallChart

Waterfall/bar breakdown chart.

import { WaterfallChart } from '@ybouhjira/hyperkit';

#Playground

Edit the code — the preview recompiles and re-renders as you type.

Live playground
Loading preview…

#More Examples

Overlapping

<WaterfallChart
  items={[
      {
        id: 'req1',
        label: 'Image 1',
        start: 0,
        end: 200,
        color: 'var(--sk-accent)'
      },
      {
        id: 'req2',
        label: 'Image 2',
        start: 50,
        end: 180,
        color: 'var(--sk-success)'
      },
      {
        id: 'req3',
        label: 'Font',
        start: 100,
        end: 300,
        color: 'var(--sk-warning)'
      },
      {
        id: 'req4',
        label: 'Script',
        start: 200,
        end: 450,
        color: 'var(--sk-error)'
      }
    ]}
/>

Empty

<WaterfallChart items={[]} />

#Props

PropTypeDefaultDescription
items *WaterfallItem[]Array of timeline items to render.
heightnumber24Row height in pixels.
labelWidthnumber120Width of the label column in pixels.
tickCountnumber5Number of tick marks on the time axis header.
classstringAdditional CSS classes.
styleimport('solid-js').JSX.CSSPropertiesInline styles.

* required prop.

#Design Tokens

This component reads the following CSS custom properties. Override them globally or per-instance to restyle it — see the CSS Variables guide.

  • --sk-bg-tertiary
  • --sk-border
  • --sk-font-size-xs
  • --sk-radius-sm
  • --sk-space-sm
  • --sk-text-muted
  • --sk-text-secondary