Modules
Server-side SVG visualization library for Elixir.
Cross-references what spec/ declares against what lib/ defines, and renders the
result as API_SURFACE.md through Surfex.Golden.
Every public function lib/ defines, read from source without compiling it.
The heading discipline spec/README.md §5 asks for, checked mechanically: one # title,
a **Status:** line on line 3, and decimal numbering that is gap-free at every level
(## 1., ### 1.1, #### 1.1.1). A lost or duplicated heading breaks the citations
every other document and the golden's Section column rely on, and nobody notices by eye.
Every function the specification declares: each `Module.function/arity` in the first
cell of a table row under spec/*.md, with the numbered section it sits in.
Axis generator for creating reference marks and labels.
Behaviour defining the interface for rendering backends.
Canvas 2D API rendering backend.
Converts an SVG arc command to a Canvas ellipse call.
Binary encoding for Canvas 2D rendering commands.
A decoder for the canvas binary format of spec/09 §4 and §5, written against the record
layouts the specification states — not against the encoder — so that
decode(encode(x)) is a genuine round trip (D-36).
Command bytes of the canvas binary format, shared by every encoder module.
Encodes the path records of the canvas binary format — the point list (path,
path32) and the full command stream (path_cubic, path_cubic32) in either
coordinate width, and the f32 cubic run (cubic_run) (spec/09 §4.3, §4.5) — and the
number coercion the SVG and IR encoders share.
Encodes Visualize.SVG.Element trees into the canvas binary format: element geometry,
presentation attributes, transform strings and d path strings.
Incremental rendering support for canvas binary format.
Hybrid SVG/Canvas backend for optimized rendering.
SVG rendering backend.
Performance benchmarking utilities for comparing rendering backends.
A chart as a design map (spec/14).
A design applied to its data (spec/14 §7.3, §14.10).
The builder for the declarative layer (spec/14 §16, D-78).
An embeddable editor of typed fragments (spec/14 §18, §19).
Axes ticked where their scale is (spec/14 §18.16, #373): the axes section of a mark's page and of a scale's — one row per position scale, a box per side the scale can stand on, a grid box, and a link to each axis's own page.
A collection of entries that can cross from one store into another (spec/14 §19.7).
The builder's import and export: the design's JSON form, in and out (spec/14 §18.12).
The builder's fragment editor, generated from the schema (spec/14 §18.5-§18.7).
A fill as a fill style (spec/14 §18.6): none, solid, a linear or a radial gradient.
The font picker (spec/14 §19.10): family, size, face and anchor of the node being edited, together, the way a drawing tool keeps them beside the canvas.
The pictures a drawn enum is chosen by (spec/14 §18.6).
The builder's inspector: Visualize.Chart.explain/1 rendered (spec/14 §18.9).
The builder's stack panel: the layers in precedence order (spec/14 §18.8).
The builder's library: the store's fragments as a tree (spec/14 §18.16).
The context panel over a layer — its key and its free variables (spec/14 §19.5, §19.10) — and the rows of its mask, which the layer's row lists (§18.8, #316).
A root tab as one page of sections (spec/14 §18.15, #249).
The builder's style palette: the styles the stack declares, and how one is made (spec/14 §18.14).
The builder's parameters form: Visualize.Chart.free_vars/1 rendered (spec/14 §18.11).
The context panel as the picker for the selected field (spec/14 §19.10).
Where a drop on the graph lands, and what a component means there (spec/14 §18.16).
The builder's preview pane: the stacked design drawn, or its faults (spec/14 §18.4).
The scales a design's bound channels need and the frame lacks (spec/14 §18.16, #370).
The data page (spec/14 §19.10, #372): what the sources root shows — one row per source
of the composed design, its name, its columns with their types, and its generator while
designing (a Visualize.Signals signal under the source's name) or the host's rows.
The builder's stack as a list of use sites, and the pure operations over it (spec/14 §19.3, §19.6, §19.9).
What a new chart still needs (spec/14 §18.4, #374): data, a mark, axes — the builder's
steps, never the validator's faults, so none blocks Save or Deploy nor badges a root.
steps/1 reads the design; the preview draws them beneath the chart, each a button
that does or opens the step.
The library of saved fragments a host may give Visualize.Chart.Builder (spec/14 §19.7).
The stack of styles at one site (spec/14 §18.18).
The builder's stylesheet, and the element that carries it (spec/14 §18.13).
The variable panel (spec/14 §19.10): the composition's variables as chips, and what a person does with them.
A design compiled for rendering per tick (spec/14 §12, D-66).
A fragment whose content is a list of use sites, and how it becomes a design (spec/14 §19.6, D-103).
What a fragment is about, and the ids it refers to (spec/14 §19.2, §19.8).
The realised frame of a chart: its scales, built once, and the static furniture — grid, axes, legend and labels — rendered from them (spec/14 §4, D-60).
The marks of a design drawn through the frame's scales (spec/14 §5, D-61).
The polar transform (spec/14 §5.2, #391): a mark laid out in (angle, r) — every x an
angle in radians clockwise from 12 o'clock, every y a radius from the centre — bent
around the arc.
Schema versions and the migrations between them (spec/14 §9).
The ten LiveView components as stored designs (spec/14 §15, D-64).
Reference resolution as one rule (spec/14 §19.6, D-103): every library id at a
reference site of a flat design is resolved through a store, so that what leaves
Visualize.Chart.flatten/2 carries no ids and what the frame draws needs no store.
The design schema as data (spec/14 §14.2).
Style resolution for the declarative layer (spec/14 §3.4, D-63): one style node, two outputs by the mode of the render target.
A text as one string with interpolation (spec/14 §7.1): "Uptime for #{var(:host)}".
The data pipeline of a mark (spec/14 §5.4, D-62): filtering, binning, stacking,
aggregation, the layouts of Visualize.Layout and the geo algorithms as %{op: …}
steps over rows.
A fragment used at a position (spec/14 §19.3, D-101).
Validates a design map against the schema (spec/14 §10).
A variable in a design (spec/14 §7.1).
Color manipulation utilities for parsing, converting, and manipulating colors.
Phoenix LiveView function components for the common chart types (spec/10 §2).
Phoenix LiveView function components for hierarchies (spec/10 §3): a node-link tree, a treemap and a sunburst.
Contour generation using the marching squares algorithm.
Kernel density estimation for contour generation from point data.
Data transformation and statistical utilities.
The fast Fourier transform of a real or complex sequence (spec/08 §9, #375): a radix-2
Cooley–Tukey decimation in time over lists, O(N log N), pure Elixir.
Tabular data as the row list the generators consume.
Easing functions for smooth animations and transitions.
Number and time formatting utilities for chart labels.
A circle on the sphere as a GeoJSON Polygon: d3-geo's geoCircle (spec/07 §2.5, D-131).
Delaunay triangulation for a set of points.
Renders GeoJSON geometries as SVG path strings.
Geographic projections for mapping spherical coordinates to a plane.
Azimuthal projections: orthographic, stereographic, gnomonic, Lambert azimuthal equal-area and azimuthal equidistant.
Compromise and polyconic world projections: Natural Earth, Equal Earth, Robinson, Winkel tripel, Aitoff and Van der Grinten.
Conic and pseudoconic projections: Albers, Lambert conformal conic, conic equal-area, conic equidistant, American polyconic and Bonne.
Cylindrical projections: Mercator, transverse Mercator, equirectangular, Lambert cylindrical equal-area, Miller and Gall-Peters.
Pseudocylindrical projections: Mollweide, sinusoidal, Eckert I-VI, Hammer, Kavrayskiy VII, Wagner IV and VI, Fahey, Collignon and loximuthal.
The arithmetic of a Web-Mercator basemap (spec/07 §8, #475): the zoom level whose 256-pixel tiles match a Mercator projection, the tiles covering a plot, where each goes in plot pixels, and its URL.
Voronoi diagram for spatial partitioning.
Phoenix LiveView JavaScript hooks for interactive visualizations.
Phoenix LiveView hook for brush selection interactions.
Phoenix LiveView hook for the chart builder's two browser gestures (spec/10 §16).
Phoenix LiveView hook that replays Canvas 2D commands on a <canvas>.
Phoenix LiveView hook that replays the canvas binary format on a <canvas>.
Phoenix LiveView hook for scroll-and-copy incremental canvas rendering.
Phoenix LiveView hook that snaps a rule and per-series markers to the nearest x of the data (spec/10 §13).
Phoenix LiveView hook that hides and shows a series from its legend entry (spec/10 §14).
Phoenix LiveView hook that reports a container's size to the LiveView (spec/10 §10).
The bus a sync group's tooltips and crosshairs share hover over, and its brushes the brushed window (spec/10 §4.3, §6.4, D-116, D-117).
Phoenix LiveView hook that shows a datum's fields under the pointer (spec/10 §12).
Phoenix LiveView hook for zoom and pan interactions.
Backend-agnostic element representation for building scene graphs.
Backend-agnostic path command representation.
Backend-agnostic transformation representation.
High-level API for incremental canvas rendering with scroll optimization.
Interpolation functions for smooth transitions between values.
Chord diagram layout for visualizing relationships between groups.
Cluster layout algorithm for dendrogram visualizations.
Force-directed graph layout.
Force functions for the force simulation.
Force-directed graph layout simulation using velocity Verlet integration.
Hexagonal binning of points in the plane (spec/06 §9, #348): d3-hexbin's lattice of
flat-topped hexagons, the columns 2 r sin(π/3) apart and the rows 1.5 r, every odd
row offset by half a column. The lattice is in the coordinates of the points, so a chart
bins pixels.
Hierarchical data structure for tree-based visualizations.
Circle packing layout for hierarchical data.
Partition layout for adjacency diagrams.
Sankey diagram layout for visualizing flow between nodes.
Tree layout algorithm for hierarchical node-link diagrams.
Treemap layout for hierarchical data as nested rectangles.
Utilities for working with polygons.
Random number generators for various probability distributions.
Main entry point for rendering visualizations.
Main SVG module providing a fluent API for building SVG documents.
Represents an SVG element as an Elixir data structure.
SVG path command builder.
Renders SVG elements to strings or iolists.
Scale functions that map from a data domain to a visual range.
A discrete scale that divides the range into uniform bands.
The protocol every scale module implements (spec/03 §1.3).
Color scales for encoding data with colors.
A continuous linear scale that maps a numeric domain to a numeric range.
A logarithmic scale for data with exponential distributions.
A discrete scale that maps categorical values to a discrete range.
Power scale for non-linear transformations.
Quantile scale for mapping sorted data to discrete buckets.
Quantize scale for mapping continuous values to discrete buckets.
An angle scale: a cyclic domain — bearing, hour of day, day of year — to radians (spec/03 §14, D-30).
Symmetric log scale for data spanning orders of magnitude including zero.
Threshold scale for mapping continuous values to discrete outputs.
A scale for temporal data (DateTime, Date, NaiveDateTime).
Shape generators for creating SVG paths from data.
Arc generator for creating circular or annular sectors.
Area generator for creating filled areas between two lines.
Band generator: a state timeline of one rectangle per datum (spec/04 §11, D-26).
Curve interpolators for line and area generators.
Line generator for creating SVG paths from data points.
Nx-accelerated line generator for high-performance path generation.
Needle generator: one filled pointer per datum from the hub to its angle, as long as its length — a gauge's indicator, a compass needle (spec/04 §16, #392).
Percentile-band generator: a median line with an inner and an outer band around it (spec/04 §14, D-28).
Pie layout generator that computes angles for pie and donut charts.
Rose generator: one Visualize.Shape.Arc sector per datum, centred on its angle and
as long as its value (spec/04 §15, D-31).
Rule generator: a vertical line at a domain x value, with an optional label (spec/04 §12, D-27).
Stack generator for creating stacked bar and area charts.
Symbol generator for categorical point marks.
X-band generator: a shaded region between two domain x values, with an optional label (spec/04 §13, D-27).
Generated sources (spec/08 §8): a chart under design has feeds that move without a host supplying any.
The timer discipline of Visualize.Layout.Force.Simulation (spec/06 §9.4), as a model.
The colours, font and sizes a chart draws with (spec/08 §7).
Mix Tasks
Fails when any document under spec/ breaks the heading discipline: more or fewer than one
# title, no **Status:** line on line 3, an unnumbered heading, a number that does not
match its level, or a gap or duplicate in the decimal numbering.
Cross-references every function spec/ declares against every public function lib/
defines, and renders the result to API_SURFACE.md.