ScatterPlot 散点图
二维散点,可按 group 分色。
基础用法
数据通过 props 传入,纯 SVG 渲染,无第三方图表库依赖。
配色取自 --viz-1..8 token,色盲友好。
<CfScatterPlot ... /> <CfScatterPlot ... /> 多 group 聚类
点的 group 字段决定颜色,未传则归到 default。
<CfScatterPlot :data="points" /> <CfScatterPlot data={points} /> API
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
data | ScatterPoint[] | — | { x, y, r?, group? }[] |
width / height | number | 480 / 240 |
反馈与讨论
ScatterPlot 散点图 的讨论