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

Copy Markdown View Source

charts.candlestick (spec/13 §7.1), a second-cut chart: a candle per interval, its body from the interval's first price to its last and its wick from the least to the greatest. The candles are macaw_data's (macaw_data#336): the bucket step adds each reading's interval start over the t window field, and aggregate(fn: ["first", "max", "min", "last"], by: "bucket") makes one row an interval holding its open, high, low and close. The candle kind draws them, a rise in the theme's good and a fall in its bad, each with its glyph; style: "ohlc" draws ticks instead of bodies. The frame computes no statistic. New in the second cut.

iex> Macaw.Frame.Charts.Candlestick.id()
"charts.candlestick"

Summary

Functions

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

Its fixtures (spec/14 §1): three weeks of prices every four hours, a candle a day.

The fragment: bucket and one aggregate of four statistics under the candle kind.

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 t (the window field) and its price.

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): three weeks of prices every four hours, a candle a day.

fragment()

@spec fragment() :: map()

The fragment: bucket and one aggregate of four statistics under the candle kind.

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 t (the window field) and its price.