Line Chart
fandhe-frontend-pre-styled-ui の line_chart mod が提供するスタイル済み Line Chart 部品です。
Demo
charts 基盤(座標スケーリング・SVG ノード木生成)を使った折れ線チャートです。軸・グリッド・凡例・ツールチップは別イシュー(#847)のスコープです。
Features
- charts 基盤(座標スケーリング・SVG ノード木生成)を使った折れ線チャート
- 系列色は charts::series_color_var(index) の固定色循環(color-palette 軸は非提供)
- 積み上げ・曲線補間は非対応(charts 共通 API 側の別イシュー)
Anatomy
root
plot
series-lineAPI Reference
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| data | &ChartData | (必須) | 描画する系列データ。 |
| aria_label | &str | (必須) | svg 要素の aria-label(データ可視化のため必須引数)。 |
| size | Size | Md | root の CSS 表示高さを切替える寸法 variant。 |
| width / height | f64 | 300.0 / 150.0 | viewBox の座標系寸法。 |
CSS Variables
| Variable | Default |
|---|---|
| --fandhe-line-chart-height | auto |
Examples
単一系列の折れ線
3 カテゴリ 1 系列の折れ線を描画します。