Macaw.Frame.Layers.Area (macaw_frame v0.1.0)

Copy Markdown View Source

The area kind (spec/04 §4.2), copied from visualize's Visualize.Chart.Mark.Shapes area.

ChannelRole, familyTypes
xposition, xtime, number, categoryreq
yposition, ynumberreq
x0, x1position, xas x
y0, y1position, ynumber
seriesseriescategory, text, number

Options: closed. Parts: fill, stroke (outline), curve. Paint: fill. One path per series through Macaw.Draw.Shape.Area: x0/x1 and y0/y1 when given, else x and y with the baseline at the y scale's zero clamped to its range, so a domain excluding zero fills to the nearer plot edge (visualize #420); a given baseline is placed as given; in polar the baseline is r's zero clamped to the r range. Breaks as line, gap breaking on y, y0 and y1. Budget: 4 × w. Summary: "area chart", "stacked area chart" after a stack step, "streamgraph" after a stack with wiggle or silhouette, "radar chart" in polar.

Summary

Functions

An area's default baseline (§4.2): the pixel of its y scale's zero (r's in polar), clamped to that scale's range; 0 without a scale.

Functions

baseline(layer, model)

@spec baseline(map(), Macaw.Frame.Coordinates.Model.t()) :: number()

An area's default baseline (§4.2): the pixel of its y scale's zero (r's in polar), clamped to that scale's range; 0 without a scale.