glaze/oat/meter

Oat documentation: https://oat.ink/components/meter/

Meter helpers for scalar values within a known range.

Anatomy

Use meter with value, min, and max to represent measurements such as usage, score, or temperature. Optional low, high, and optimum set qualitative thresholds.

Recipe

import glaze/oat/meter

meter.meter([
  meter.value_int(68),
  meter.min_int(0),
  meter.max_int(100),
  meter.low_int(30),
  meter.high_int(80),
  meter.optimum_int(70),
])

References

Values

pub fn high(amount: String) -> attribute.Attribute(msg)
pub fn high_float(amount: Float) -> attribute.Attribute(msg)
pub fn high_int(amount: Int) -> attribute.Attribute(msg)
pub fn low(amount: String) -> attribute.Attribute(msg)
pub fn low_float(amount: Float) -> attribute.Attribute(msg)
pub fn low_int(amount: Int) -> attribute.Attribute(msg)
pub fn max(amount: String) -> attribute.Attribute(msg)
pub fn max_float(amount: Float) -> attribute.Attribute(msg)
pub fn max_int(amount: Int) -> attribute.Attribute(msg)
pub fn meter(
  attrs: List(attribute.Attribute(msg)),
) -> element.Element(msg)
pub fn min(amount: String) -> attribute.Attribute(msg)
pub fn min_float(amount: Float) -> attribute.Attribute(msg)
pub fn min_int(amount: Int) -> attribute.Attribute(msg)
pub fn optimum(amount: String) -> attribute.Attribute(msg)
pub fn optimum_float(amount: Float) -> attribute.Attribute(msg)
pub fn optimum_int(amount: Int) -> attribute.Attribute(msg)
pub fn value(amount: String) -> attribute.Attribute(msg)
pub fn value_float(amount: Float) -> attribute.Attribute(msg)
pub fn value_int(amount: Int) -> attribute.Attribute(msg)
Search Document