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

Copy Markdown View Source

charts.pie (spec/13 §4.5): a pie, or a donut through inner, over its values with the pad angle, a ring from inner to the outer radius, contrast labels hidden where they don't fit, and a center text in a donut. Copied from visualize's Visualize.Chart.Presets.pie_chart/1 and the gallery's Examples.Charts.DonutChart (examples/lib/examples/charts/donut_chart.ex); the preset's outer radius R − 10 is the frame's margin of 10.

iex> Macaw.Frame.Charts.Pie.id()
"charts.pie"

Summary

Functions

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

Its fixtures (spec/14 §1): visualize's pie fixture as the gallery's donut.

The fragment: a polar frame of one arc layer and its labels.

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.5).

Its slot: data, a value and an optional label.

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): visualize's pie fixture as the gallery's donut.

fragment()

@spec fragment() :: map()

The fragment: a polar frame of one arc layer and its labels.

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.5).

slots()

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

Its slot: data, a value and an optional label.