Macaw.Frame.Charts.Gauge (macaw_frame v0.1.0)

Copy Markdown View Source

charts.gauge (spec/13 §4.10): three status zones with their glyphs, a fill to the reading and a needle at the newest row over the sweep, the reading labeled with its unit; polarity reverses the zones. Copied from the gallery's Examples.Charts.GaugeChart (examples/lib/examples/charts/gauge_chart.ex). The zones come from the parameters, not a slot: each is a rect at constant edges over the slot's newest row, its role's glyph written as its label at its middle, so the zones read in grayscale.

iex> Macaw.Frame.Charts.Gauge.id()
"charts.gauge"

Summary

Functions

What it draws, for a person and a builder's library.

Its fixtures (spec/14 §1): the gallery's gauge, a load reading of 72 percent.

The fragment: a polar frame of the zones, the fill and the needle.

The fragment's id in the catalog store.

What the fragment is: a whole design, or layers placed in one.

Its namespace (spec/13 §2).

Its parameters (spec/13 §3, §4.10).

Its slot: data, one value; the newest row is the reading.

Functions

doc()

@spec doc() :: String.t()

What it draws, for a person and a builder's library.

fixtures()

@spec fixtures() :: [map()]

Its fixtures (spec/14 §1): the gallery's gauge, a load reading of 72 percent.

fragment()

@spec fragment() :: map()

The fragment: a polar frame of the zones, the fill and the needle.

id()

@spec id() :: String.t()

The fragment's id in the catalog store.

kind()

@spec kind() :: :design | :layers

What the fragment is: a whole design, or layers placed in one.

namespace()

@spec namespace() :: :charts | :maps | :diagrams

Its namespace (spec/13 §2).

parameters()

@spec parameters() :: [{String.t(), map()}]

Its parameters (spec/13 §3, §4.10).

slots()

@spec slots() :: %{required(String.t()) => map()}

Its slot: data, one value; the newest row is the reading.