Preview Updated 2026-05-10

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
src/App.vue vue
<CfScatterPlot ... />
src/App.tsx tsx
<CfScatterPlot ... />

Multi-group clustering

A point’s group field decides its color; if omitted, it falls into default.

Demo source
src/App.vue vue
<CfScatterPlot :data="points" />
src/App.tsx tsx
<CfScatterPlot data={points} />

API

PropTypeDefaultDescription
dataScatterPoint[]{ x, y, r?, group? }[]
width / heightnumber480 / 240

反馈与讨论

Scatter plot · Discussion

0
0 / 600
一键发送
正在加载评论...