Charts
ScatterChart
Correlation plots, bubble charts and clustered scatter by group.
<script>
import { ScatterChart } from "@codeatlasdev/ui/charts";
</script>
<ScatterChart series={[{ name: "Accounts", data: [[1200, 3.4], [4800, 5.1]] }]} yName="Conversion %" />
Points are [x, y] or [x, y, size]. When any point has a third value the chart switches to bubble mode automatically and scales the symbols by size.
Basic scatter
Visits against conversion rate.
Code
Bubble chart
The third value of each point sets the bubble size.
Code
Clustered by tier
One series per group, each with its own palette color.
Code
Props
| Prop | Type | Default | Description |
|---|---|---|---|
series | ScatterSeries[] | – | Named series as { name, data: [x, y] | [x, y, size][], color? }. |
xName | string | – | Label of the x axis. |
yName | string | – | Label of the y axis. |
xFormatter | (v: number) => string | – | Formats x ticks and tooltip. Overrides valueFormatter for x. |
yFormatter | (v: number) => string | – | Formats y ticks and tooltip. Overrides valueFormatter for y. |
valueFormatter | (v: number) => string | – | Fallback formatter used for both axes. |
height | string | '320px' | CSS height of the chart. |
class | string | '' | Extra class names. |