PureAdmin.Components.KpiGaugeList (PureAdmin v1.2.0)

Copy Markdown View Source

KPI Comparison gauges showcase — goal-oriented progress bars.

Tracks _kpi-comparison-gauges.scss from @keenmate/pure-admin-core 2.7.1+. Default layout is a cell-min-driven auto-fit grid (cells stay at least --pa-kpi-gauge-cell-min wide, default 20rem). grid_layout switches to 2col (deterministic 2-cols) or max_2..max_6 (cap auto-fit at N). Override the cell minimum per instance via cell_min_width.

Summary

Functions

kpi_gauge(assigns)

Renders one gauge tile inside a kpi_gauge_list/1.

Bar fill width = bar_percent (0–100; not capped — overshoots are signalled by sentiment colour, not by overflowing the bar). tick_position shifts the target tick along the bar (default upstream 100% = right edge); useful when the bar represents a wider scale with the target inside.

Attributes

  • id (:string) - Defaults to nil.
  • variant (:string) - Defaults to nil.Must be one of nil, "positive", "warning", "negative", or "neutral".
  • label_text (:string) - Defaults to nil.
  • value_text (:string) - Defaults to nil.
  • unit_text (:string) - Defaults to nil.
  • prefix_text (:string) - Defaults to nil.
  • bar_percent (:integer) - Bar fill width as a percentage (0-100; not capped visually). Defaults to nil.
  • tick_position (:string) - CSS length / percent for --pa-kpi-gauge-tick-pos (default upstream 100%). Defaults to nil.
  • tick_color (:string) - Override for --pa-kpi-gauge-tick-color. Defaults to nil.
  • scale_start_text (:string) - Defaults to "0".
  • scale_end_text (:string) - Defaults to nil.
  • detail_title_text (:string) - Defaults to nil.
  • previous_value_text (:string) - Defaults to nil.
  • target_text (:string) - Defaults to nil.
  • delta_text (:string) - Defaults to nil.
  • delta_absolute_text (:string) - Defaults to nil.
  • delta_absolute_sentiment (:atom) - Defaults to nil.Must be one of nil, :pos, :neg, or :warn.
  • detail_rows (:list) - Defaults to nil.
  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • label
  • value
  • scale
  • detail

kpi_gauge_list(assigns)

Attributes

  • title_text (:string) - Defaults to nil.
  • is_live (:boolean) - Defaults to false.
  • live_text (:string) - Defaults to "LIVE".
  • footer_text (:string) - Defaults to nil.
  • grid_layout (:string) - Defaults to nil.Must be one of nil, "2col", "max_2", "max_3", "max_4", "max_5", or "max_6".
  • cell_min_width (:string) - CSS length for --pa-kpi-gauge-cell-min (default upstream 20rem). Defaults to nil.
  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required) - Gauge tiles — kpi_gauge/1 instances.
  • footer