Bar Chart
fandhe-frontend-pre-styled-ui の charts(内包)mod が提供するスタイル済み Bar Chart 部品です。
Demo
ChartData(複数系列)+ LinearScale + SVG ノード木生成ヘルパーのみで組み立てる、外部依存ゼロのグループ棒グラフです。orientation で縦/横を切り替えます。軸線・グリッド・凡例・ツールチップはイシュー #847 のスコープです。
Features
- ChartData(複数系列)+ LinearScale + SVG ノード木生成ヘルパーのみで組み立てるグループ棒グラフ
- orientation(vertical/horizontal)で棒の向きを切り替える
- 軸線・グリッド・凡例・ツールチップは charts(共通 API)側の別部品
Anatomy
root
bar
category-labelAPI Reference
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| orientation | Orientation | Vertical | カテゴリ軸の向き(vertical: 棒が縦に伸びる / horizontal: 棒が横に伸びる)。 |
| width | f64 | 480.0 | viewBox の幅(px 相当)。 |
| height | f64 | 300.0 | viewBox の高さ(px 相当)。 |
Examples
縦/横 orientation
同じデータを vertical/horizontal で描画します。