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

Copy Markdown View Source

charts.bullet (spec/13 §7.1), a second-cut chart: the newest row's value as a bar over its qualitative ranges (a many role, each a range's bound) shaded in the theme's grid, with a rule-like mark at its target. Each range is a translucent rect from the poor end of the measure to its bound, so where ranges overlap the shade deepens: the poorest range is the darkest. polarity says which end is poor: "higher_is_better" shades from the measure's zero, "lower_is_better" from its far end. The ranges are a fold of their fields (macaw_data's), the newest row a take; the frame computes nothing. The target is a segment across the middle of the bar's band, so it stands out of the value's bar. New in the second cut.

iex> Macaw.Frame.Charts.Bullet.id()
"charts.bullet"

Summary

Functions

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

Its fixtures (spec/14 §1): revenue against its target over three ranges.

The fragment: range rects, the value's rect and the target's segment.

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, §7.1).

Its slot: data, a value, an optional target and optional ranges.

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): revenue against its target over three ranges.

fragment()

@spec fragment() :: map()

The fragment: range rects, the value's rect and the target's segment.

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, §7.1).

slots()

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

Its slot: data, a value, an optional target and optional ranges.