Skip to content
fandhe-frontend
GitHub

Bar Chart

fandhe-frontend-pre-styled-uicharts(内包)mod が提供するスタイル済み Bar Chart 部品です。

関連 API: fandhe-frontend-pre-styled-ui API

Demo

ChartData(複数系列)+ LinearScale + SVG ノード木生成ヘルパーのみで組み立てる、外部依存ゼロのグループ棒グラフです。orientation で縦/横を切り替えます。軸線・グリッド・凡例・ツールチップはイシュー #847 のスコープです。

JanFebMarApr
JanFebMarApr

Features

  • ChartData(複数系列)+ LinearScale + SVG ノード木生成ヘルパーのみで組み立てるグループ棒グラフ
  • orientation(vertical/horizontal)で棒の向きを切り替える
  • 軸線・グリッド・凡例・ツールチップは charts(共通 API)側の別部品

Anatomy

root
  bar
  category-label

API Reference

Arguments

NameTypeDefaultDescription
orientationOrientationVerticalカテゴリ軸の向き(vertical: 棒が縦に伸びる / horizontal: 棒が横に伸びる)。
widthf64480.0viewBox の幅(px 相当)。
heightf64300.0viewBox の高さ(px 相当)。

Examples

縦/横 orientation

同じデータを vertical/horizontal で描画します。

JanFebMarApr
JanFebMarApr