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

PropTypeDefaultDescription
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 number280Height 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) => stringfmtValueFormats x-axis numbers.
yFormat (n: number) => stringfmtValueFormats value-axis numbers and tooltip values.
sizeFormat (n: number) => stringfmtValue
/docs/scatter-chart Truss UI · MIT