activeFilterCount |
function |
(filters: CrossfilterFilters) => number |
addUnits |
function |
time moved by count calendar units (daylight saving safe for days and above). |
allDates |
function |
True when every category is a Date, so a time scale makes sense. |
alluvialGraph |
function |
Turns stage-by-stage category flows into sankey nodes and links: one node per category per stage (pinned to its column), the same color across stages, in category order. |
alluvialNodeId |
function |
Node id of a category at a stage: "2:vip". |
ancestorIds |
function |
Ids of the ancestors of node, root first (the node itself excluded). |
ancestors |
function |
Root first, node last. |
angleOf |
function |
Angle of the vector (cx, cy) -> (x, y), in [0, TAU). |
appendBars |
function |
Adds live bars to a series: a bar with the same date as the last one replaces it (the candle still forming), a newer bar is appended, an older one is ignored. |
applyMatrix |
function |
(matrix: Matrix, v: Vec3) => Vec3 |
arcLine |
function |
Open centre-line arc, meant to be stroked (strokeLinecap="round" gives the rounded ends). |
arcPath |
function |
Closed path of an annular sector (a pie wedge when innerRadius is 0), with optional rounded corners. |
areaPath |
function |
Closed area between a top and a bottom edge sampled at the same x positions (bottom[i] pairs with top[i]). |
aspectRatio |
function |
Width / height ratio, always >= 1. |
assignLanes |
function |
Packs overlapping intervals into the fewest lanes: items are placed in start order into the first lane that is already free. |
assignUnits |
function |
Category of each position when counts are laid one after the other. |
averageTrueRange |
function |
Average true range over the last period bars (simple mean of the true ranges). |
bandScale |
function |
({ count, range, paddingInner, paddingOuter, }: BandScaleOptions) => BandScale |
BARBER_SILHOUETTES |
constant |
Barbershop silhouettes drawn for this library. |
barPath |
function |
Bar rounded only at its value end, the way the eye reads the bar’s length. |
beeswarm |
function |
Beeswarm layout: offsets perpendicular to the value axis so that no two circles overlap. |
binCounts |
function |
Counts values into the bins delimited by ascending edges. |
binEdges |
function |
Bin edges for values: a width and a start aligned to it. |
binIndex |
function |
Index of the bin of value: bins are [edge i, edge i+1), the last one includes its upper edge. |
binRecords |
function |
Count per bin of a numeric dimension, over the records that pass every OTHER filter. |
binsInRange |
function |
Indices of the bins a range filter covers (a bin is covered when it overlaps the range). |
blendRings |
function |
RingPoint-wise blend of two rings of equal length: t 0 gives from, 1 gives to. |
bollinger |
function |
Simple average ± k population standard deviations of the same window. |
boxStats |
function |
Five-number summary plus mean and Tukey outliers. |
boxTooltipRows |
function |
Tooltip rows for a five-number summary. |
boxValueText |
function |
One-line summary of a box for aria-valuetext. |
branchColor |
function |
Base color of a node: its own color, otherwise the palette slot of the branch it belongs to below focus, so the open level always shows several hues. |
breakCycles |
function |
Splits the links into an acyclic set and the links that close a cycle. |
bubbleRadiusScale |
function |
Bubbles shrink in narrow frames (down to 55%) so they keep some separation. |
buildCategoryAxis |
function |
Turns categories into pixel positions, ticks and hit-testing for charts that share a horizontal category or time axis. |
buildHierarchy |
function |
Turns nested data into linked nodes with summed values. |
buildTopology |
function |
Builds a TopoJSON topology from lon/lat polygons. |
buildTreeModel |
function |
Builds the node model. |
calendarGrid |
function |
Lays days out like a contribution calendar: one column per week (Monday first), one row per weekday. |
categoryGroupSpans |
function |
Pixel span of each group along the category axis. |
categoryLayout |
function |
Geometry for charts with a category axis and a continuous value axis (box plots, violins, rainclouds, beeswarms). |
CHART_PALETTE |
constant |
Series colors. |
ChartSyncStore |
class |
A set of named channels. |
chordLayout |
function |
(matrix: ReadonlyArray<readonly number[]>, { padAngle, startAngle, sortGroups, sortSubgroups, }?: ChordOptions) => Chor… |
chordsOf |
function |
Ribbons that touch a group (as source or target). |
clampView |
function |
Keeps the map from being lost: its content box (content, in zoom 1 pixels) must stay inside the width x height viewport on each axis, or, when it is bigger than the viewport… |
clean |
function |
Rounds away binary noise such as 0.30000000000000004. |
clearFilters |
function |
Clears one dimension, or all of them. |
clipRingToHemisphere |
function |
A closed ring in view coordinates cut to the visible hemisphere (z >= 0). |
clockTicks |
function |
Round clock ticks (every 15 min … |
clusterPoints |
function |
Greedy screen-distance clustering: the heaviest unassigned point claims every unassigned point closer than distance; the cluster sits at the value-weighted centre of its members. |
computeLayout |
function |
Computes every pixel of a cartesian chart: margins, scales, ticks, paths, bars, labels and annotations. |
createAxisMap |
function |
Piecewise-linear map between data values and pixels, given matching samples (e.g. |
createRawProjection |
function |
Creates a raw projection: - equirectangular: plate carrée (x = lon, y = -lat) with an optional standard parallel; - mercator: conformal, latitudes clamped to ±85.05°; - `equal… |
createRegionIndex |
function |
Looks a record up by the id or by the name of a region. |
criticalPath |
function |
Critical path method over finish-to-start dependencies. |
cursorAction |
function |
`(tool: “ruler” \ |
curveCommands |
function |
Commands through points. |
datetimeColumnLabels |
function |
Column labels for a heatmap whose columns are consecutive points in time. |
DAY_MS |
constant |
86400000 |
dayKey |
function |
Local midnight key of a date, for holiday lookups. |
decodeArcs |
function |
Minimal TopoJSON decoder for area objects. |
DECORATIVE |
constant |
Spread on purely visual SVG groups and text that screen readers get from the data table instead. |
DEFAULT_CHORD_LABELS |
constant |
ChordLabels |
DEFAULT_CROSSFILTER_LABELS |
constant |
CrossfilterLabels |
DEFAULT_EXPORT_TEXTS |
constant |
ExportTexts |
DEFAULT_GLOBE_LABELS |
constant |
GlobeLabels |
DEFAULT_HEATMAP_LABELS |
constant |
HeatmapLabels |
DEFAULT_HIERARCHY_LABELS |
constant |
HierarchyLabels |
DEFAULT_INK_LABELS |
constant |
InkLabels |
DEFAULT_LABELS |
constant |
ChartLabels |
DEFAULT_LIMITS |
constant |
ViewLimits |
DEFAULT_MAP_LABELS |
constant |
MapLabels |
DEFAULT_SANKEY_LABELS |
constant |
SankeyLabels |
DEFAULT_SCALE_COLORS |
constant |
Required<ScaleColors> |
DEFAULT_STAT_LABELS |
constant |
StatLabels |
DEFAULT_STOCK_RANGES |
constant |
1W, 1M, 3M, 6M, 1Y, All. |
DEFAULT_STOCK_TOOLS |
constant |
readonly StockTool[] |
DEFAULT_TREE_LABELS |
constant |
TreeLabels |
defaultBrickSize |
function |
Brick size used when none is given: the ATR(14), never below 0.01. |
defaultCategoryLabel |
function |
Short default label: “6 oct” for dates, the value itself otherwise. |
defaultMapHeight |
function |
Height that suits map at width: its own projected height / width ratio, so a tall country gets a tall box and a world map a wide one (within 220 and 640 px). |
defaultXLabel |
function |
Default category label: Spanish short dates, grouped numbers, strings as given. |
degToRad |
function |
(degrees: number) => number |
dendrogramLayout |
function |
Dendrogram (cluster layout): like the tidy tree, but every leaf is drawn on the last level, so the leaves line up and the branches read as a hierarchy of groupings. |
descendants |
function |
Pre-order list: node, then its subtree. |
describeNode |
function |
Spoken summary of a node for the live region and aria-valuetext. |
DIRECTION_COLORS |
constant |
Direction of change: chart-up and chart-down tokens, chart-total when flat or a total. |
directionOf |
function |
up / down / flat for a change; changes within epsilon count as flat. |
divergingColor |
function |
Diverging scale: low below center, mid at it, high above. |
downloadPng |
function |
Rasterizes through an <img> and a canvas; scale 2 gives retina sharpness. |
downloadSvg |
function |
`(input: SVGSVGElement \ |
downsample |
function |
LTTB over { x, y } points: at most threshold points that keep the visual shape. |
dragRotation |
function |
New rotation after dragging dx, dy pixels: the surface follows the pointer (one disc radius is one radian), so a small globe turns faster per pixel than a big one. |
EASE_OUT |
constant |
"cubic-bezier(.22,1,.36,1)" |
easeOutCubic |
function |
Cubic ease-out for requestAnimationFrame transitions, t in 0..1. |
EDGE_SAMPLES |
constant |
Samples per edge: four edges, so a ring holds 4 * EDGE_SAMPLES points. |
edgeColorOf |
function |
Color of the edge that enters node. |
ema |
function |
Exponential moving average with smoothing 2 / (period + 1). |
EMPTY_INK |
constant |
InkState |
estimateTextWidth |
function |
Approximate rendered width of a tick label at 11px (tabular figures). |
evenEdges |
function |
Bin edges (count + 1 of them) that split [min, max] evenly. |
explodeBins |
function |
Stacks for every bin with one shared radius (the smallest that makes the fullest bin fit), so all the dots of a histogram look alike. |
exportFileName |
function |
File name from a chart title: lower case, accents removed, dashes, with the extension. |
extent |
function |
Min and max of the finite numbers in values, or null when there are none. |
fadeIn |
function |
Fades an element in. |
FALLBACK_HEIGHT |
constant |
Height used before the first measurement when a chart fills its parent. |
FALLBACK_WIDTH |
constant |
Width used for the server render and the first client paint before measuring. |
featurePositions |
function |
Every outer-ring vertex of the features, for fitting a projection. |
fibLevels |
function |
Retracement levels between two prices: ratio 0 sits at a, ratio 1 at b. |
filterRecords |
function |
Records that pass every filter. |
findNode |
function |
`(root: HierarchyNode, id: string) => HierarchyNode \ |
fitLabel |
function |
Label that fits in maxWidth: the full text, a shortened one with an ellipsis, or null when not even four characters fit. |
fitLaneHeight |
function |
Lane height that makes the rows fill available exactly: sum(count * (lane + gap) - gap + 2 * rowPad) = available, clamped to [min, max]. |
fitProjection |
function |
Projects positions and scales them to fill width x height (minus padding) keeping the aspect ratio, centred. |
fitRadius |
function |
Largest radius at which count dots fit a width x height box, or the minimum radius. |
fitUnitGrid |
function |
Picks the column count that gives the largest units inside width x height. |
fitView |
function |
View that shows a contentWidth x contentHeight drawing centred in a width x height viewport, padding from the edges, never enlarged past maxFit. |
foldText |
function |
Lower-case text without accents, for forgiving searches. |
formatClock |
function |
“09:30” in 24-hour time. |
formatCompact |
function |
1234 -> “1,2 mil”; 2500000 -> “2,5 M”. |
formatCurrency |
function |
“S/ 1 234.50” |
formatDate |
function |
“lun 6 oct 2026”: the full label used by tooltips and the data table. |
formatDuration |
function |
Elapsed time as a short text: “3 d”, “2.5 h”, “40 min”. |
formatNumber |
function |
“12 345.68” |
formatPercent |
function |
0.125 -> “12.5%” |
freedmanDiaconisWidth |
function |
Freedman–Diaconis bin width: 2 · IQR · n^(-1/3); 0 when the IQR is 0. |
fromVec |
function |
Unit vector to [lon, lat] in degrees. |
fullCategoryLabel |
function |
Long label for tooltips and tables: “mar 6 oct 2026” for dates. |
funnelStages |
function |
Stage geometry along one axis: each stage spans its slice of length, starts as wide as its own value and ends as wide as the next stage, so the outline is continuous. |
GANTT_ZOOM_ORDER |
constant |
readonly GanttZoom[] |
GANTT_ZOOMS |
constant |
Record<GanttZoom, GanttZoomLevel> |
ganttDomain |
function |
Visible window for a zoom: the tasks padded by one pad unit on each side, on unit boundaries. |
ganttHeader |
function |
Both header rows of a zoom level. |
ganttRows |
function |
Depth-first rows of the task tree, children right after their parent in input order. |
ganttScale |
function |
Linear date → x scale. |
gaussianKde |
function |
Gaussian kernel density estimate, evaluated on an even grid. |
geometryExtent |
function |
Extent of the outer boundary of a geometry in lon/lat. |
geometryPath |
function |
SVG path (d) of an area: one closed subpath per ring. |
geometryRings |
function |
All rings of a geometry, flattened (outer rings and holes). |
GLOBE_MAX_LAT |
constant |
Maximum latitude of the view center: the poles themselves are a singular view. |
globeArc |
function |
Points of the great circle from a to b as world vectors, optionally lifted off the surface (lift is the extra radius at the middle, as a fraction of the globe radius) so an … |
globeLinePieces |
function |
Visible stretches of a polyline of world vectors, projected: a path leaving the visible hemisphere is cut at the horizon so lines never wrap behind the globe. |
globeRingsPath |
function |
SVG path of rings drawn on the globe. |
graticuleLines |
function |
Meridians and parallels every step degrees, as polylines of [lon, lat]. |
greatCircle |
function |
Points of the great circle (the shortest path on the globe) from a to b, steps + 1 of them, as [lon, lat]. |
greatCircleDistance |
function |
Angular length of the great circle between two positions, in degrees. |
gridCell |
function |
Cell of the index-th unit. |
gridColumns |
function |
Columns that fit a container: as many as keep every panel at least minPanelWidth wide (gaps included), never more than maxColumns or count, never fewer than one. |
groupAt |
function |
Index of the group whose arc contains angle, or -1 (in the padding or outside). |
groupLeaves |
function |
Folds runs of leaf siblings into one group node, so a manager with twenty apprentices shows “20 apprentices” instead of twenty cards. |
groupRecords |
function |
Totals per value of dimension, over the records that pass every OTHER filter. |
groupSeed |
function |
Seed of one box or violin, so every group gets its own stable jitter. |
headerCells |
function |
Cells of one header row, clipped to the scale. |
heatmapScale |
function |
Builds the color function of a heatmap from its options and every finite value. |
heightOf |
function |
Number of levels below node (0 for a leaf). |
heikinAshi |
function |
Heikin-Ashi candles: each bar opens at the midpoint of the previous HA bar and closes at the average of the raw bar, which smooths the trend. |
hexAt |
function |
Index of the tile whose hexagon contains the point, or -1. |
hexLayout |
function |
({ rows, columns, width, height }: HexLayoutInput) => HexLayout |
hexNeighbors |
function |
Ids of the tiles that share an edge with tile (odd-r offset neighbours). |
hexPath |
function |
Closed path of a pointy-top hexagon centred at (cx, cy). |
hexPoints |
function |
The six corners of a pointy-top hexagon as an SVG points value; inset shrinks it for the gap. |
HIERARCHY_FRAME_CLASS |
constant |
Class for the ChartFrame of a hierarchy chart: makes it a size container (@container/chart) so the header and legend below can react to its width. |
hierarchyKey |
function |
Keyboard handling shared by the hierarchy charts: arrows move between the children of the focused node, Enter opens the active one, Escape goes up. |
histogram |
function |
Bins values with the chosen rule. |
HOUR_MS |
constant |
3600000 |
IDENTITY_VIEW |
constant |
MapView |
initialCollapsed |
function |
Ids collapsed at first: nodes flagged collapsed, and every node at initialDepth. |
initials |
function |
“AR” for “Ana Rojas”, “K” for “Kevin”. |
inkOn |
function |
Text color readable on a tint(color, percent) fill. |
inkPath |
function |
The pen path of a stroke given in pixels: thinned, smoothed, then splined. |
inkReducer |
function |
(state: InkState, action: InkAction) => InkState |
interpolateView |
function |
(from: PartitionView, to: PartitionView, t: number) => PartitionView |
invertOrthographic |
function |
The [lon, lat] under a screen pixel, or null outside the disc. |
isSelected |
function |
True when value is inside the dimension’s filter (or the dimension has none). |
isUnitIconName |
function |
(value: unknown) => value is UnitIconName |
jitterValues |
function |
Deterministic jitter for raw observations. |
keyRotation |
function |
Rotation after an arrow key: left and right turn the globe, up and down tilt it. |
labelAnchor |
function |
A point well inside the region, for its label: the point of the largest polygon farthest from every edge (a coarse “pole of inaccessibility”: grid search, then two refinements). |
largestRemainder |
function |
Shares total whole units between weights so they add up exactly (largest remainder method). |
layoutHexGrid |
function |
Largest hexagons that fit tiles in a width x height area, centered. |
levelStrength |
function |
Strength (0-100) of the branch hue for a partition cell (sunburst ring or icicle band): strong next to the open node, lighter further out, with a small spread between siblings so … |
linearRegression |
function |
Ordinary least squares fit y = slope · x + intercept; null below two distinct x. |
linearScale |
function |
({ domain, range, nice, tickCount, }: LinearScaleOptions) => ContinuousScale |
linearTicks |
function |
Evenly spaced round values inside [min, max]. |
linePath |
function |
Line through the points; null entries break the line. |
logScale |
function |
Base-10 logarithmic scale, extended to whole decades. |
lttbIndices |
function |
Indices LTTB keeps from points (ascending, always including the first and last). |
macd |
function |
Moving average convergence divergence, 12 / 26 / 9 by default. |
mapFeatures |
function |
Decoded features of a map (once per map object, not per render). |
matchesFilter |
function |
(filter: CrossfilterFilter, value: DimensionValue) => boolean |
matchKey |
function |
Lowercase, accent-free key so “Áncash”, “ancash” and “ANCASH” join. |
mean |
function |
(values: readonly number[]) => number |
measureRange |
function |
What a drag between two anchors measures. |
measureSegment |
function |
Difference between two points of the chart, in data units. |
MERCATOR_MAX_LAT |
constant |
Web Mercator cannot show the poles; latitudes are clamped here. |
mondayOf |
function |
Monday on or before date. |
MONOCHROME_BASE |
constant |
Base hue of a monochrome chart: the active brand accent. |
monochromeByValue |
function |
Shades for values, darkest on the largest value, so rank reads as intensity. |
monochromeShade |
function |
Shade step of count in one hue: step 0 is the full color, the last step the palest tint (40%), mixed towards the surface so it works in both themes. |
monotoneTangents |
function |
Tangents for a monotone cubic through points (Fritsch–Butland): the curve never overshoots between two samples, so a peak in the data is a peak on screen. |
moveCursor |
function |
One arrow-key step of the crosshair in data units: a category on index axes (a fiftieth of the window on time axes) and a fiftieth of the value window vertically; big moves five… |
nearestPoint |
function |
Index of the item closest to (x, y) within radius pixels, or null. |
niceDomain |
function |
Widens [min, max] so both ends land on a tick. |
niceRadarMax |
function |
Rounds value up to a tidy multiple so levels rings land on round numbers. |
NO_FILTERS |
constant |
Readonly<Record<string, CrossfilterFilter>> |
nodePath |
function |
“Miraflores › Kevin” relative to from (excluded). |
nodeTooltipRows |
function |
(node: HierarchyNode, focus: HierarchyNode, format: ValueFormatter, labels: HierarchyLabels, color: string) => TooltipR… |
nonWorkingSpans |
function |
Contiguous spans of non-working days inside the domain: days whose weekday (0 = Sunday) is not in workingDays, plus holidays. |
normalize |
function |
Clamped position of value in [min, max], 0-1. |
normalizeAngle |
function |
Wraps any angle into [0, TAU). |
normalizeRotation |
function |
Keeps a rotation valid: longitude wrapped, latitude clamped. |
normalPdf |
function |
Standard normal density scaled to mean and sd. |
packDots |
function |
Dot-plot stack for one bin: dots fill rows from the baseline up, each row centred in the lane. |
panelWidth |
function |
Width of one panel for a container width and a column count. |
parliamentLayout |
function |
Seats of a hemicycle. |
parliamentRows |
function |
Fewest arcs that hold seats without crowding. |
partitionLayout |
function |
Adjacency partition: every node gets a slice of its parent’s span proportional to its value. |
PATTERN_NAMES |
constant |
readonly ["stripes", "stripes-reverse", "dots", "crosshatch", "grid", "zigzag", "checks", "diamonds", "waves"] |
patternAt |
function |
Cycles the built-in designs, handy for “one pattern per series” charts. |
patternFill |
function |
Paint value that fills a mark with the pattern of id. |
patternId |
function |
Id safe for url(#id): letters, digits, dashes and underscores only. |
PERU_HEX_TILES |
constant |
Peru as 25 tiles (24 departments + Callao), north-west at the top left and the south-east at the bottom right, with the Pacific coast down the left edge. |
pickLabels |
function |
Which labels to draw: left to right, a label is kept unless it overlaps an already kept one horizontally while sitting less than lineHeight away vertically. |
PICTOGRAM_SILHOUETTES |
constant |
Human figures and everyday silhouettes for pictograms, in gallery order. |
pixelToPlot |
function |
Data point under a plot-relative pixel, clamped to the plot box. |
plotDomain |
function |
Visible data window of a plot, for the keyboard cursor. |
plotToPixel |
function |
Plot-relative pixel of a data point, whichever way the plot is laid out. |
pointScale |
function |
({ count, range, padding }: PointScaleOptions) => BandScale |
polarPoint |
function |
Point at radius from (cx, cy) in the direction of angle. |
popUnits |
function |
Pops every [data-unit] in document order: a short scale-and-fade with a stagger that keeps the whole sequence under about a second. |
positionsExtent |
function |
Extent of a set of positions: [west, south, east, north]. |
progressFractions |
function |
Fill of each of count units sharing max: a 4.5 rating out of 5 stars is [1, 1, 1, 1, 0.5]. |
projectOrthographic |
function |
Orthographic projection of [lon, lat], or null on the far side of the globe. |
projectSpan |
function |
Position of a span inside a view: x in 0-1 of the view (may fall outside), level relative to it. |
quantile |
function |
Quantile p of unsorted values. |
quantileSorted |
function |
Quantile p (0-1) of an ascending array, interpolating linearly between the two closest ranks (the “type 7” definition used by most spreadsheets). |
raceItems |
function |
State at a fractional frame position: values move linearly, ranks follow a smoothstep so a bar glides into its new row instead of jumping. |
radialEdgePath |
function |
Edge between two points of a radial layout. |
radialTreeLayout |
function |
Radial tidy tree: the root sits in the centre, each level on its own ring, leaves share the angle evenly and every parent points at the middle of its leaves. |
radToDeg |
function |
(radians: number) => number |
rangeColor |
function |
Fill of a stepped range: its own color, a tone (its ink at 55% over the surface, readable with ink text in both themes), or a step of the brand scale by position. |
rangeIndex |
function |
Index of the first range containing value, or -1. |
rangeOfBins |
function |
Interval covered by bins from..to (inclusive indices), as a range filter value. |
rangeWindow |
function |
Inclusive index window [from, last] for a preset over ascending dates: the first date on or after the last date minus the preset. |
ranksOf |
function |
Rank of every value, 0 for the largest; ties keep the entity order. |
rebase |
function |
Change relative to the value at base (0.1 = +10%), for comparing series that live on different scales. |
rectRing |
function |
Rectangle as a clockwise polygon starting at the top-left corner: top edge, right edge, bottom edge, left edge. |
renko |
function |
Renko bricks from the closes. |
resolveAxes |
function |
Axes in drawing order. |
resolveAxisFormat |
function |
Shorter variant for axis ticks: currency drops the cents and turns compact from ten thousand up (“S/ 12 mil”); plain numbers turn compact from 10 000. |
resolveDistributionLabels |
function |
(labels?: Partial<DistributionLabels>) => DistributionLabels |
resolveDrawingHeight |
function |
Height of the drawing: the measured slot when filling, width / aspectRatio when a ratio is given, else the pixel height. |
resolveFormat |
function |
Turns a ValueFormat into a function. |
resolveHeatmapLabels |
function |
(labels?: Partial<HeatmapLabels>) => HeatmapLabels |
resolveHierarchyLabels |
function |
(labels?: Partial<HierarchyLabels>) => HierarchyLabels |
resolveLabels |
function |
(labels?: Partial<ChartLabels>) => ChartLabels |
resolveMapLabels |
function |
(labels?: Partial<MapLabels>) => MapLabels |
resolvePattern |
function |
The tile of a named design or of a custom pattern (custom tiles are clamped to a sane size). |
resolveRoutes |
function |
(routes: readonly MapRoute[], points: readonly MapPoint[]) => ResolvedRoute[] |
resolveUnitShape |
function |
(icon: UnitIcon) => ResolvedUnitShape |
revealClip |
function |
Reveals children left to right by scaling a clip rectangle. |
revealPoint |
function |
Pans the view the least that brings the zoom 1 point (x, y) inside the viewport. |
ribbonPath |
function |
Closed ribbon between the two ends of a chord at radius: along the source arc, a curve through the centre to the target arc, along it, and back. |
ringArea |
function |
Signed area of a ring (shoelace); positive when counter-clockwise in a y-up plane. |
ringCenter |
function |
Mean of the polygon’s points; for these convex-ish shapes it sits inside the shape. |
ringPath |
function |
Closed SVG path through the points. |
roundedPolyline |
function |
SVG path through orthogonal points with corners rounded by up to radius. |
roundedRectPath |
function |
Rectangle with an independent radius per corner, clamped to fit. |
roundToStep |
function |
Rounds to the nearest multiple of step (e.g. |
routeArcPath |
function |
SVG path of a quadratic arc. |
routeControl |
function |
Control point of a quadratic curve from a to b: the midpoint pushed sideways by bend times the distance (0 is a straight line, 0.25 a soft arch). |
routeDependency |
function |
Finish-to-start arrow from the end of a predecessor (from) to the start of its successor (to), with right angles only. |
routePolylinePath |
function |
SVG path of a polyline given as separate pieces (greatCircle output once projected). |
rsi |
function |
Relative strength index with Wilder smoothing: the first average gain and loss are plain means of period changes, later ones are (previous * (period - 1) + current) / period. |
sankeyDiff |
function |
Merges the flows of two periods by source -> target (repeated pairs are summed). |
sankeyFlowOf |
function |
Ids of the links and nodes upstream and downstream of a node (the node included). |
sankeyLayout |
function |
Lays out a sankey diagram in a width x height box. |
sankeyLinkPath |
function |
Centre line of a link band, drawn with stroke-width = link.width. |
sankeyTraceOf |
function |
The path through a link: the link itself, everything that feeds its source (upstream) and everything its target feeds (downstream). |
scaleGradient |
function |
CSS gradient for a legend bar of a continuous scale. |
searchTree |
function |
Nodes whose name, subtitle or badge contains every word of query, in pre-order (document order). |
sectorPath |
function |
Annular sector (“donut slice”) path. |
sectorRing |
function |
Annular sector as a polygon with the same edge order as rectRing: the outer arc plays the top edge, the end radius the right edge, the inner arc the bottom edge and the start ra… |
seededRandom |
function |
Deterministic pseudo-random numbers in [0, 1) (mulberry32), so jitter is stable across renders. |
segments |
function |
Splits a sequence at null gaps into drawable runs. |
selectRegions |
function |
A map restricted to some regions (by id), e.g. |
sequentialColor |
function |
Sequential scale: mid (empty) to high. |
serializeSvg |
function |
Serializes one drawing, or several stacked vertically (e.g. |
seriesColor |
function |
Color for the series at index, unless the series brings its own. |
setRangeFilter |
function |
`(filters: CrossfilterFilters, dimension: string, range: readonly [number, number] \ |
sharedDomain |
function |
One domain for every panel, so the same height means the same value everywhere. |
sharedSampleIndices |
function |
Indices to keep so several series that share one category axis stay aligned: the union of the LTTB picks of each series (computed on its non-null values), plus the neighbours of e… |
shareOf |
function |
(node: HierarchyNode, of: HierarchyNode) => number |
shiftDate |
function |
date moved back by count units, in local calendar time (months clamp to the last day). |
shortMonth |
function |
Short Spanish month without the period Intl appends (“oct”, not “oct.”). |
shortWeekday |
function |
Short Spanish weekday without the trailing period (“lun”). |
signed |
function |
A signed number with its sign always shown: “+4”, “-2.5”, “0”. |
silvermanBandwidth |
function |
Silverman’s rule of thumb for a Gaussian kernel: 0.9 · min(sd, IQR / 1.34) · n^(-1/5). |
simplifyLine |
function |
Douglas-Peucker line simplification (iterative, so long coastlines cannot overflow the stack). |
sliceAngles |
function |
Splits [startAngle, endAngle] proportionally to values. |
slotAt |
function |
Index of the equal-width slot centred on offset + i * TAU / count that angle falls in. |
sma |
function |
Simple moving average over period points; null until a full window of numbers exists. |
smoothPath |
function |
SVG path through the points as a Catmull-Rom spline converted to cubic Béziers: smooth, passing through every point. |
smoothPoints |
function |
Moving average over three points, passes times; the ends stay where the pen started and stopped. |
snapTime |
function |
Rounds time to the nearest hour (step under a day) or the nearest local midnight. |
sortedFinite |
function |
Finite values, sorted ascending (a new array). |
spinRotation |
function |
Rotation after seconds of the idle spin at speed degrees per second (eastwards view drift). |
spreadLabels |
function |
Vertical collision avoidance for a column of labels. |
spreadSlopeLabels |
function |
Moves labels apart so neighbours keep at least gap pixels between their centers, staying inside [min, max] and keeping their original order. |
squarify |
function |
Squarified treemap: splits rect into one rectangle per value, areas proportional to the values, keeping them as close to squares as possible. |
stackAxes |
function |
Margins and offsets for axes that stack outward from the plot on each side, in the order given. |
stackLayers |
function |
Stacks series on top of each other per index. |
stackLayout |
function |
Offsets of drawings stacked top to bottom, and the size of the whole stack. |
standardDeviation |
function |
Sample standard deviation (n - 1 in the denominator); 0 below two values. |
startCursor |
function |
Where the crosshair appears when a plot is focused: the middle of the window. |
startOf |
function |
Start of the calendar unit holding time, in local time. |
stitchRing |
function |
Walks the arc list of one ring; ~i is arc i backwards. |
stockStats |
function |
Summary numbers of a price series: returns, volatility, extremes and the maximum drawdown. |
streamLayout |
function |
Baseline-shifted stacking for stream graphs. |
streamOrder |
function |
Stacking order. |
sturgesBinCount |
function |
Sturges’ rule: ceil(log2 n) + 1 bins. |
subtreeSize |
function |
Every node below node. |
syncKeyOf |
function |
(value: XValue) => SyncKey |
TAU |
constant |
number |
thinPoints |
function |
Drops points closer than minDistance to the previous kept one; the last point is always kept. |
thinTicks |
function |
Drops labels that would collide, keeping an even rhythm (every 2nd, 3rd, …) so the first label always stays. |
tickStep |
function |
Step between ticks: 1, 2 or 5 times a power of ten, close to span / count. |
timeScale |
function |
({ domain, range }: TimeScaleOptions) => TimeScale |
timeTicks |
function |
Calendar-aligned ticks (local midnight, Mondays, first of the month, January) with es-PE labels. |
tint |
function |
Mixes percent% of color into base (the surface by default). |
toggleValue |
function |
Adds the value to a set filter, or removes it; a set that becomes empty clears the dimension. |
TONE_COLORS |
constant |
Stroke/text color and soft fill for annotations and status marks. |
tooltipFit |
function |
Keeps the tooltip inside narrow frames: below 480 px it flips at the middle and its width is capped to half the container (cqw, the chart frame is a size container). |
tooltipLeft |
function |
Left edge of a tooltip width wide next to anchor x, kept inside containerWidth. |
toPolar |
function |
Angle (0 at twelve o’clock, clockwise) and distance of a point around center. |
topologyFeatures |
function |
Regions of a topology object as lon/lat features. |
toScreen |
function |
Screen position of a point drawn at zoom 1. |
toVec |
function |
[lon, lat] in degrees to a unit vector. |
toXY |
function |
[value, cross] to screen x,y, swapping axes for horizontal charts. |
treeEdgePath |
function |
SVG path from a parent box to a child box. |
treeKeyMove |
function |
Maps an arrow key to a tree move relative to the drawing: in a top-down chart Down goes to the first child and Right to the next sibling; in a left-to-right chart Right goes to th… |
treeLayout |
function |
Tidy layout of a tree: parents centred over their children, no two boxes on the same level closer than siblingGap, levels levelGap apart. |
treemapLayout |
function |
Nested squarified layout of root’s subtree inside rect. |
treeNeighbor |
function |
Node reached from id by move among the laid-out (visible) nodes. |
treePathToRoot |
function |
Ids from the root down to id (inclusive), following parentId. |
truncateLabel |
function |
Shortens label with an ellipsis so it fits maxWidth pixels at fontSize. |
unionExtent |
function |
Smallest range covering every extent; null when none is finite. |
UNIT_FRAME_CLASS |
constant |
Unit charts make their frame a named container, so the HTML around the drawing follows the chart width instead of the viewport. |
UNIT_ICONS |
constant |
{ readonly person: { readonly path: "M12 2.5a4 4 0 1 1 0 8a4 4 0 1 1 0-8zM4.5 21.5v-2.8c0-3.6 3.3-6.2 7.5-6.2s7.5 2.6 7… |
UNIT_LEGEND_CLASS |
constant |
Legend under the drawing in narrow containers, at its requested place from @sm up. |
unitCount |
function |
23 people at 5 per icon -> 4 full icons and a 0.6 icon. |
unitFractions |
function |
Fill of every unit a value takes: unitFractions(23, 5) -> [1, 1, 1, 1, 0.6]. |
useAnimatedNumber |
hook |
Eases a displayed number towards target (cubic ease-out). |
useAnimatedView |
hook |
Animates a partition view (the zoom window of a sunburst or icicle) towards target with requestAnimationFrame. |
useCategoryExplorer |
hook |
Hover and keyboard cursor for charts whose marks belong to categories (units, cells, seats, rows). |
useChartInk |
hook |
State and overlay of the ruler and freehand-ink tools. |
useChartSize |
hook |
Tracks the content box of an element with a ResizeObserver. |
useChartSync |
hook |
Subscribes to a sync channel; with no syncId it is inert and never re-renders. |
useChartWidth |
hook |
Width only (kept for charts that do not need the height). |
useCrossfilter |
hook |
The shared dataset and filters of the nearest CrossfilterProvider. |
useDistributionLegend |
hook |
Colors, legend toggling and highlight for a list of series. |
useDrill |
hook |
Builds the hierarchy once per data set and keeps the focused (zoomed) node. |
useEntryAnimation |
hook |
Plays an entry animation once per replayKey with the Web Animations API. |
useIndexNavigation |
hook |
Active-item state for charts made of discrete items (slices, axes, stages). |
useIsomorphicLayoutEffect |
hook |
Layout effect in the browser, plain effect on the server (no SSR warning). |
useMapGeometry |
hook |
Fits map into width x height. |
useMapView |
hook |
Zoom and pan state of a map: wheel, drag, two-finger pinch, and imperative zoomBy / fit / focusBox for buttons, keyboard and cluster clicks. |
usePanZoom |
hook |
Pan (drag), zoom (wheel, pinch, buttons) for an element that holds a transformed stage. |
useReducedMotion |
hook |
True when the user asked the OS for less motion. |
useSeriesState |
hook |
Legend-driven visibility and highlight, shared by every chart type. |
useStockStream |
hook |
State for a live price series. |
viewFitting |
function |
View that frames a box given in zoom 1 pixels inside the viewport. |
viewMatrix |
function |
Rows of the view basis: east, north and the direction towards the viewer at the rotation’s center. |
viewToScreen |
function |
View coordinates to screen pixels (y grows downwards). |
violinPath |
function |
Closed outline of a (half) violin from a density curve. |
visibleMax |
function |
Largest value among the limit bars that are on screen at this moment. |
visibleTree |
function |
The part of the tree that is visible, as layout input. |
vwap |
function |
Volume weighted average price anchored at from: running sum of the typical price (high + low + close) / 3 times volume, over the running volume. |
waffleCounts |
function |
Cells per category in a waffle of cells cells. |
waterfallLayout |
function |
Running totals for a list of steps. |
wrapLon |
function |
Longitude wrapped into [-180, 180). |
xyLayout |
function |
Two continuous axes (scatter, bubble, histogram). |
zoomAround |
function |
Scales view by factor keeping the screen point px, py fixed. |
zoomAt |
function |
Multiplies the zoom by factor keeping the screen point (cx, cy) fixed. |