
Symbols | D3 by Observable
const symbol = d3. symbol (). type (d3.symbolCross); If type is a function, the symbol generator’s arguments and this are passed through. This is convenient for use with selection .attr , say in conjunction with an ordinal scale to produce a categorical symbol encoding.
D3 by Observable | The JavaScript library for bespoke data …
Treemaps, trees, force-directed graphs, Voronoi, contours, chords, circle-packing… a library of layout algorithms at the ready.
Curves | D3 by Observable
const line = d3. line (). curve (d3.curveBundle. beta (0.5)); curveCardinal ( context ) Source · Produces a cubic cardinal spline using the specified control points, with one-sided differences used for the first and last piece.
Delaunay triangulations | D3 by Observable
const delaunay = d3.Delaunay. from ([[0, 0], [0, 1], [1, 0], [1, 1]]); Otherwise, fx and fy are functions that are invoked for each element in the points array in order, and must return the respective x and y coordinate for each point.
Tree | D3 by Observable
The separation accessor is used to separate neighboring nodes. The separation function is passed two nodes a and b, and must return the desired separation.The nodes are typically siblings, though the nodes may be more distantly related if …
API index | D3 by Observable
d3.treemapResquarify - like d3.treemapSquarify, but performs stable updates. squarify .ratio - set the desired rectangle aspect ratio. d3.partition - create a new partition (icicle or sunburst) layout.
d3-shape | D3 by Observable
The d3-shape module provides a variety of shape generators for your convenience. As with other aspects of D3, these shapes are driven by data: each shape generator exposes accessors that control how the input data are mapped to a visual representation.
Voronoi diagrams | D3 by Observable
const delaunay = d3.Delaunay. from ([[0, 0], [0, 100], [100, 0], [100, 100]]); const voronoi = delaunay. voronoi ([0, 0, 640, 480]); If bounds is not specified, it defaults to [0, 0, 960, 500]. The Voronoi diagram is returned even in degenerate cases where no triangulation exists — namely 0, 1 or 2 points, and collinear points.
Linear scales | D3 by Observable
Examples · Source · Returns a number format function suitable for displaying a tick value, automatically computing the appropriate precision based on the fixed interval between tick values, as determined by d3.tickStep.
d3-delaunay | D3 by Observable
This is a fast library for computing the Voronoi diagram of a set of two-dimensional points. It is based on Delaunator, a fast library for computing the Delaunay triangulation using sweep algorithms. The Voronoi diagram is constructed by connecting the circumcenters of adjacent triangles in the Delaunay triangulation. See one of: