Macaw.Frame.Summary.Points (macaw_frame v0.1.0)

Copy Markdown View Source

A realized Frame's keyboard points indexed, none built (spec/11 §5.1–§5.4), copied from visualize's Visualize.Chart.Summary.Points.

The points are, per series in the summary's order, the rows of the data layers that draw a value (the rows of one series reading or stacked key, or a layer's rows when it has neither) in data order, a layer that draws no number read by identity (Macaw.Frame.Summary.Identities); layers whose series share a name are one series. Nothing is sampled.

index/2 reads each layer's value and series columns once, through Macaw.Frame.Columns, and keeps them indexed with the pixels the drawing placed (Macaw.Frame.Placements): a series is its runs, each a layer's ordinals. build/2 makes one point at a time, its value and position read by index and its place read for its row alone, so a point of a 50,000-row series costs what one point costs. Macaw.Frame.Reach answers the keyboard from it.

Summary

Types

t()

A Frame's points indexed: series a tuple of each series' %{name, count, grid?, runs, grid}, its runs {offset, layer, ordinals, count} in drawing order; layers a tuple of what each layer holds for its points.

Functions

The point at {series, index}, built alone: %{series, index, text, x, y, row, layer, key, cell}, or nil where there is none.

The points of a realized Frame indexed, none built; placements the same realization's (Macaw.Frame.Placements.new/1), or nil to place what it reads.

Types

t()

@type t() :: %Macaw.Frame.Summary.Points{layers: tuple(), series: tuple()}

A Frame's points indexed: series a tuple of each series' %{name, count, grid?, runs, grid}, its runs {offset, layer, ordinals, count} in drawing order; layers a tuple of what each layer holds for its points.

Functions

build(points, at)

@spec build(t(), {integer(), integer()}) :: map() | nil

The point at {series, index}, built alone: %{series, index, text, x, y, row, layer, key, cell}, or nil where there is none.

index(value, placements)

@spec index(term(), Macaw.Frame.Placements.t() | nil) :: t()

The points of a realized Frame indexed, none built; placements the same realization's (Macaw.Frame.Placements.new/1), or nil to place what it reads.