Skip to content

Components

RangeChart

Daily response time

Use the arrow keys to explore categories, or Home and End to jump.

Component reference

Properties

Use RangeChart

Low and high values by category, with an optional midpoint.

Example import style
range-chart.tsxTSX
"use client";

import { FloodRoot, RangeChart } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <RangeChart label="Response time (ms)" lowLabel="P10" highLabel="P90" midpointLabel="Median" items={[
        {id:"mon", label:"Mon", low:84, high:162, midpoint:119},
        {id:"tue", label:"Tue", low:92, high:176, midpoint:125}
      ]} />
    </FloodRoot>
  );
}

Design notes

  • Use a shared scale to compare intervals. Supply a midpoint only when it adds information, such as a measured median.
  • Use null bounds for missing observations and give the bounds meaningful labels with units. Inspect a category to read its exact values.

API reference

PropValuesDefault
labelstringRequired
itemsreadonly RangeChartItem[]Required
domainreadonly [number, number]—
formatValue(value: number) => string—
lowLabelstring—
highLabelstring—
midpointLabelstring—
emptyLabelstring—
missingLabelstring—
navigationLabelstring—
Native HTML propsOmit<HTMLAttributes<HTMLDivElement>, "children" | "role" | "aria-label">Forwarded
View TypeScript source