Scatter plot
Two-dimensional scatter chart, colored by group.
Basic usage
Data is passed via props and rendered as pure SVG, with no third-party charting dependency.
Colors are drawn from the --viz-1..8 tokens and are colorblind-friendly.
Demo source
<CfScatterPlot ... /> <CfScatterPlot ... /> Multi-group clustering
A point’s group field decides its color; if omitted, it falls into default.
Demo source
<CfScatterPlot :data="points" /> <CfScatterPlot data={points} /> API
| Prop | Type | Default | Description |
|---|---|---|---|
data | ScatterPoint[] | — | { x, y, r?, group? }[] |
width / height | number | 480 / 240 |
反馈与讨论
Scatter plot · Discussion