crispmeasured from Attio

BarChart

A responsive bar chart — Attio's Reports dashboard chart.

The chart behind Attio's Reports dashboards: brand bars with rounded tops over dashed horizontal gridlines, a value axis on the left, and category labels below. Pure CSS (no SVG or chart dependency), so it scales with its container. Renders role="img" with an accessible summary. Pair it with a Card for the "report card" look.

Preview

Companies by Country Count Companies

Usage

import { BarChart } from "crisp";

<BarChart
  data={[
    { label: "France", value: 1 },
    { label: "United States", value: 8 },
  ]}
  xAxisTitle="Primary location › Country"
/>;

API

PropTypeDefaultDescription
data{ label, value }[]One bar per entry.
heightnumber240Overall height in px.
maxnumberautoForce the axis maximum (otherwise a nice max is derived).
ticksnumber5Number of value gridlines (includes 0).
colorstringbrandBar colour.
format(n: number) => stringFormats ticks and bar values (e.g. currency).
xAxisTitleReactNodeCentred title below the category labels.

On this page