# `Macaw.Frame.Charts.Candlestick`
[🔗](https://github.com/dcoai/macaw_frame/blob/v0.1.0/lib/macaw/frame/charts/candlestick.ex#L1)

`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"

# `doc`

```elixir
@spec doc() :: String.t()
```

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

# `fixtures`

```elixir
@spec fixtures() :: [map()]
```

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

# `fragment`

```elixir
@spec fragment() :: map()
```

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

# `id`

```elixir
@spec id() :: String.t()
```

The fragment's id in the catalog store.

# `kind`

```elixir
@spec kind() :: :design | :layers
```

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

# `namespace`

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

Its namespace (spec/13 §2).

# `parameters`

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

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

# `slots`

```elixir
@spec slots() :: %{required(String.t()) =&gt; map()}
```

Its slot: `data`, a `t` (the window field) and its `price`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
