Components / Charts
ScatterChart
Scatter plots with optional size and group-colour encoding, hover and arrow-key readout, and a table view.
@ruckc/truss-chart Charts
Import
import { ScatterChart } from '@ruckc/truss-chart';
import '@ruckc/truss-chart/charts.css'; // series palette Playground
points
groups
API
| Prop | Type | Default | Description |
|---|---|---|---|
points required | ScatterPoint[] | — | `size` encodes a third value as marker diameter; `group` picks the (fixed-order, max 8) palette colour and legend entry. |
title | string | — | Heading text. |
subtitle | string | — | Secondary text under the title. |
height | number | 280 | Height in pixels (or any CSS length). |
xLabel | string | — | |
yLabel | string | — | |
sizeLabel | string | 'Size' | Name of the size dimension in tooltips and the table. |
sizeRange | [number, number] | [8, 24] | Marker diameter in px for the smallest and largest `size`. Never drawn below 8px. |
xFormat | (n: number) => string | fmtValue | Formats x-axis numbers. |
yFormat | (n: number) => string | fmtValue | Formats value-axis numbers and tooltip values. |
sizeFormat | (n: number) => string | fmtValue |