# RangeChart

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

Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.

## Example

```tsx
"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

| Prop | Values | Default |
| --- | --- | --- |
| `label` | `string` | `Required` |
| `items` | `readonly RangeChartItem[]` | `Required` |
| `domain` | `readonly [number, number]` | `—` |
| `formatValue` | `(value: number) => string` | `—` |
| `lowLabel` | `string` | `—` |
| `highLabel` | `string` | `—` |
| `midpointLabel` | `string` | `—` |
| `emptyLabel` | `string` | `—` |
| `missingLabel` | `string` | `—` |
| `navigationLabel` | `string` | `—` |
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "role" \| "aria-label">` | `Forwarded` |
