Examples

Request rate and latency

Preview
Latency under loadScatter chart showing 4 plotted values across 1 series.
Use the arrow keys to move between data points, Home and End to jump to the first and last.
Example.tsx
import { ScatterChart } from '@reactloom/charts';

const data = [{ rate: 100, latency: 82 }, { rate: 190, latency: 110 }, { rate: 220, latency: 130 }, { rate: 320, latency: 205 }];

export default function Example() {
  return <ScatterChart title="Latency under load" xLabel="Requests per second" yLabel="Latency (ms)"
    data={data} x="rate" series={[{ key: 'latency', label: 'Latency (ms)' }]} />;
}

Resolution by team size

Preview
Resolution time by team sizeScatter chart showing 6 plotted values across 2 series.
  • Support
  • Onboarding
Use the arrow keys to move between data points, Home and End to jump to the first and last.
Example.tsx
import { ScatterChart } from '@reactloom/charts';

const data = [{ teamSize: 3, support: 9, onboarding: 13 }, { teamSize: 5, support: 8, onboarding: 11 }, { teamSize: 8, support: 6, onboarding: 7 }];

export default function Example() {
  return <ScatterChart title="Resolution time by team size" xLabel="Team members" yLabel="Hours"
    data={data} x="teamSize" series={[{ key: 'support', label: 'Support' }, { key: 'onboarding', label: 'Onboarding' }]} />;
}

API reference

ScatterChart props
PropTypeDefault
title
Names the figure.
string—
data
Observations in keyboard navigation order.
readonly Row[]—
x
Numeric x coordinate. Non-finite x coordinates are omitted.
Accessor<Row, number>—
series
Each series supplies a y value. Missing y values are shown as gaps.
readonly ChartSeries<Row>[]—
xLabel · yLabel
Names and units for both axes.
string—
table
Choose how the data table is displayed.
'toggle' | 'visible' | 'none'—

Keyboard interaction

Keyboard interactions
KeyAction
Arrow keysMove through observations in source order
Home / EndJump to the first or last observation
EscapeDismiss the active readout

Usage guidelines

Do

  • Name both axes and give their units. Explain the relationship you want the reader to examine.

Don’t

  • Avoid inferring causation from a visible relationship alone.