# `Fude.Annotation`
[🔗](https://github.com/hattoriai/fude/blob/v0.1.0/lib/fude/annotation.ex#L1)

A note on a chart, at a place of its data: what a graphics desk writes
on a chart to tell its story.

    chart
    |> Fude.annotate(:label, x: "North", y: 136_000, text: "Best quarter on record")
    |> Fude.annotate(:band, x: {~D[2026-03-01], ~D[2026-05-01]}, text: "Launch")
    |> Fude.annotate(:line, y: 4000, text: "Goal")

The places are values of the data, on the chart's own scales: a
category's name, a date, a number.

  * `:label` - words with a line to a point (`x` and `y`; with `x`
    alone, the top of the chart at that `x`).
  * `:band` - a shaded range of `x` or of `y` (`{from, to}`), with words
    at its top.
  * `:line` - a line across the chart at an `x` or a `y`, with words.

# `place`

```elixir
@type place() :: term() | {term(), term()}
```

# `t`

```elixir
@type t() :: %Fude.Annotation{
  id: String.t() | nil,
  text: String.t() | nil,
  type: type(),
  x: place(),
  y: place()
}
```

# `type`

```elixir
@type type() :: :label | :band | :line
```

# `new`

```elixir
@spec new(type(), keyword()) :: t()
```

An annotation of a type; raises an `ArgumentError` that says what is wrong.

---

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