Simal UI
Components

RectangleChart

FRACTIONS, NOT COUNTS — each datum is a 0–1 fill ratio, applied directly as y={(1 - value) * 100}% / height={value * 100}%.

Passing raw counts (12, 41, …) produces negative offsets and heights in the thousands of percent, so every cell clips to solid.

Cells are laid out a week at a time, seven per row.

Import

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

Props

PropValuesDefaultDescription
data[]Density values from 0 to 1, one per cell. The chart does no normalising — feed it fractions, not counts.

Examples

Flat

Empty And Full

The two ends of the range, so the empty and full cells are both visible.

Multiple Weeks

Five weeks — the day labels render on the row starting at index 28.

On this page