Histogram Chart
Visualize data distributions with histograms. Chart.ts automatically calculates bins, renders frequency bars, and optionally overlays a normal distribution curve. SVG rendering with Tailwind CSS styling.
$
npm install @chartts/coreexample.tsx
import { histogram } from "@chartts/core"
const svg = histogram({
data: responseTimesMs, // array of numbers
bins: 20,
showNormalCurve: true,
xLabel: "Response Time (ms)",
yLabel: "Frequency",
})Features
Automatic bin calculation
Custom bin count or boundaries
Normal distribution curve overlay
Frequency and density modes
Axis labels and grid lines
SVG rendering with Tailwind CSS
Under 3kb tree-shaken