Simal UI
Components

BarChart

CONSTRAINED SCALE — BarChart.tsx draws both bars against a hard-coded divisor of 20 ((item.total / 20) * 100 into a 100px SVG), so:

  • values above 20 overflow the viewport and clip into identical full-height bars, and
  • completed is not drawn as a fraction of total; the two are independent bars that happen to overlap.

Every story here therefore stays inside 0–20. Feeding it large counts (88 of anything) renders a wall of identical bars.

Import

import { BarChart } from '@simal/ui/nativewindui';

Props

PropValuesDefaultDescription
data[]One entry per bar: { day, total, completed }. completed is drawn as its own bar overlapping total, not as a fraction of it, so values above ~20 collapse into a wall of identical bars.

Examples

Full Completion

At Scale Ceiling

At the top of the usable range — anything above 20 clips.

Empty

On this page