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

Copy Markdown View Source

charts.slope (spec/13 §7.1), a second-cut chart: an entity's before and after readings joined by a segment across two band columns, before on the left and after on the right, with a text at each end. Each row's two readings are moved under their columns by two macaw_data folds (before to k0 and v0, after to k1 and v1), so a segment reads both ends from one row and the column bands are named by the roles; the frame computes nothing. A segment that rises is drawn in its series color, as one that falls: color is the entity's. New in the second cut.

iex> Macaw.Frame.Charts.Slope.id()
"charts.slope"

Summary

Functions

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

Its fixtures (spec/14 §1): five services' error rates before and after a release.

The fragment: two folds under a segment per entity and a text at each end.

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, an entity with its before and after readings.

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): five services' error rates before and after a release.

fragment()

@spec fragment() :: map()

The fragment: two folds under a segment per entity and a text at each end.

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, an entity with its before and after readings.