API Reference Fude v#0.1.0

Copy Markdown View Source

Modules

Fude (筆, "brush") draws charts in a Phoenix app.

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

What a channel of a chart shows: the field of the data it reads, and how. x, y, color and size are channels.

A chart: its layers, its words (title, subtitle, caption, source), and the data it draws.

The function component of Fude: <.chart>.

The data of a chart, in columns: each field with its type and its values, in the order of the rows.

Collaboration on charts, for people and agents, in Issho's rooms: a chart's spec is a shared state of the room (Issho.State), that everyone changes with the same functions, and that is a valid chart after every change.

A place in a chart, in the chart's own terms (its data, never pixels, as each person has the chart at their own size): where a person's pointer is, where an agent points (Issho's point tool). Its format is part of Fude's public API, and only grows.

One layer of a chart: a kind (:bar, :line...), its channels and its options. A chart has one layer, or several drawn one over the other (Fude.layers/2).

New points for a chart on the page, without sending its data again.

A chart's data from an Ecto query, grouped and aggregated in the database: a chart of fifty million rows reads a few hundred.

The rules of a chart's scales that the server and the browser both apply: nice domains, the ticks of a number axis and of a time axis, the bins of a histogram and the units of a time.

A chart as plain data, to save and load back.

Helpers for testing charts with Phoenix.LiveViewTest: they read what a chart shows, as the server made it for the browser.

Mix Tasks

Builds the Fude charts into priv/static.

Sets up Fude in a Phoenix application.

Checks the built files before a release of Fude.