Scatter Chart
fandhe-frontend-pre-styled-ui の charts(内包)mod が提供するスタイル済み Scatter Chart 部品です。
Demo
散布図専用の ScatterData(系列ごとの (x, y) 座標列)+ LinearScale(x/y 双方)+ SVG ノード木生成ヘルパーのみで組み立てる、外部依存ゼロの散布図です。軸線・グリッド・凡例・ツールチップはイシュー #847 のスコープです。
Features
- 散布図専用の ScatterData(系列ごとの (x, y) 座標列)+ LinearScale(x/y 双方)+ SVG ノード木生成ヘルパーのみで組み立てる外部依存ゼロの散布図
- 点マーカーは背景色ハロー付きで、viewBox 端でもハローが欠けないよう root は overflow: visible(イシュー #1598)
- 軸線・グリッド・凡例・ツールチップは charts(共通 API)側の別部品
Anatomy
root
pointAPI Reference
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
width | f64 | 480.0 | viewBox の幅(px 相当)。 |
height | f64 | 300.0 | viewBox の高さ(px 相当)。 |
point_radius | f64 | 4.0 | 点マーカーの半径(px 相当)。 |
Data Attributes
| Part | Attribute | Observed Values |
|---|---|---|
point | data-index | 0, 1, 2, 3, 4 |
point | data-series | cohort a, cohort b |
Examples
2 系列の散布図
cohort a/b の 2 系列を重ねて表示します。