Skip to content
fandhe-frontend
GitHub

Bar Segment

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

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

Demo

系列合計に対する各カテゴリの構成比を 100% 積み上げバーとして表示します。合計が 0 の系列は構成比が定義できないため構築時に拒否されます(ChartError::ZeroTotal)。

Jan21.82%Feb36.36%Mar27.27%Apr14.55%

Features

  • 系列合計に対する各カテゴリの構成比を 100% 積み上げバーとして表示する
  • 合計が 0 の系列は構成比が定義できないため構築時に拒否される(ChartError::ZeroTotal)

Anatomy

root
  bar
    segment
  legend
    legend-item
      legend-marker
      legend-label
      legend-value

API Reference

Arguments

NameTypeDefaultDescription
series_name&str(必須)構成比の対象系列名。

CSS Variables

VariableDefault
--fandhe-bar-segment-percent0%

Examples

構成比バー

visits 系列の月別構成比を 100% 積み上げで表示します。

Jan21.82%Feb36.36%Mar27.27%Apr14.55%