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

Copy Markdown View Source

charts.sankey (spec/13 §5.5): ribbons colored by their source under the node rects, each node labeled outside its rect toward the nearer edge. Copied from the gallery's Examples.Charts.SankeyDiagram (examples/lib/examples/charts/sankey_diagram.ex). Nodes are the flows' distinct ids, labeled by id (spec/13 §5: the nodes slot is optional and this fragment reads links alone).

iex> Macaw.Frame.Charts.Sankey.id()
"charts.sankey"

Summary

Functions

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

Its fixtures (spec/14 §1): an energy budget's flows.

The fragment: the sankey step's links as ribbons and nodes as rects.

The fragment's id in the catalog store.

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

A network's links slot (spec/13 §5): source, target and value.

Its namespace (spec/13 §2).

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

Its slot: links (spec/13 §5).

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): an energy budget's flows.

fragment()

@spec fragment() :: map()

The fragment: the sankey step's links as ribbons and nodes as rects.

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.

links(value_optional?)

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

A network's links slot (spec/13 §5): source, target and value.

namespace()

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

Its namespace (spec/13 §2).

parameters()

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

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

slots()

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

Its slot: links (spec/13 §5).