charts.layout → plotArea
Chart layout: the plot area inside margins, legend items wrapped into rows, and greedy label collision avoidance.
plotArea in TypeScript, one function of this group
1.0.1
py rs ts
33 tests
charts.stack
Stack several series for stacked bars and areas: on zero, normalised to 100%, or diverging around zero.
stack in TypeScript
1.0.0
py rs ts
14 tests
charts.line-chart
Complete line chart geometry as data: plot area, number or date axes, gridlines, series paths, colours, legend.
lineChart in TypeScript
1.0.0
py rs ts
11 tests
charts.bar-chart
Complete bar chart geometry as data, grouped or stacked: plot area, axes, gridlines, bar rectangles, colours, legend.
barChart in TypeScript
1.0.0
py rs ts
11 tests
charts.format
Axis and label text for charts: tick numbers, SI prefixes (1.2k, 3.4M), percentages, dates and money.
A group of 5: formatTick, formatSi, formatPercent, formatDate, formatMoneyTick
1.0.0
py rs ts
61 tests
charts.axis
Axis geometry as data: tick positions, tick marks, label anchors and gridlines for number, time and category axes.
A group of 5: axisFromTicks, numberAxis, timeAxis, bandAxis, gridLines
1.0.1
py rs ts
49 tests
charts.palette
A categorical palette of n colour-blind-safe colours for chart series: Okabe-Ito or Paul Tol's bright scheme.
palette in TypeScript
1.0.0
py rs ts
12 tests
charts.sparkline
A sparkline's SVG path and end marker from a series, fitted into a box, with gaps left as breaks.
sparkline in TypeScript
1.0.0
py rs ts
11 tests
charts.shape
SVG path strings for lines, areas, steps, monotone curves, bars, arcs and pie slices, identical in every language.
A group of 7: linePath, areaPath, stepPath, monotoneCurve, barRects, arcPath, pieAngles
1.0.1
py rs ts
70 tests
charts.histogram-bins
Bin values into histogram bins on round edges, by Sturges' rule, Freedman-Diaconis, or a fixed width.
histogramBins in TypeScript
1.0.0
py rs ts
17 tests
charts.downsample
Reduce a long series to a few points that keep its visual shape, by Largest-Triangle-Three-Buckets (LTTB).
downsample in TypeScript
1.0.0
py rs ts
11 tests
charts.extent
The minimum and maximum of a series as [min, max], skipping gaps (null), or null when there is no value.
extent in TypeScript
1.0.1
py rs ts
15 tests
charts.ticks
Axis ticks: a round step (1, 2 or 5 x 10^k), the ticks on it, and calendar ticks from days to years.
A group of 4: tickStep, niceTicks, timeTickInterval, timeTicks
1.0.0
py rs ts
57 tests
charts.contrast
WCAG 2.x contrast ratio between two colours, and which text colour reads best on a background.
A group of 2: contrastRatio, readableTextColor
1.0.0
py rs ts
22 tests
charts.interpolate-color
The colour at a point along a sequential or diverging ramp, mixed in OKLab so steps look even; hex in, hex out.
interpolateColor in TypeScript
1.0.0
py rs ts
19 tests
charts.scale
Map data values onto screen positions and back: linear, log, time, band and point scales, and nice domains.
A group of 7: linearScale, invertLinear, niceDomain, logScale, timeScale, bandScale, pointScale
1.1.0
py rs ts
93 tests
charts.color
Hex colours to RGB and back, and sRGB channels to linear light and back, identically in every language.
A group of 4: parseHex, toHex, srgbToLinear, linearToSrgb
1.0.1
py rs ts
39 tests
health.age-in-months Unreviewed
Age in completed months and days on a given date, for paediatric charts and doses; month ends handled like birthdays.
ageInMonths in TypeScript
1.0.1
py rs ts
19 tests
monitor.rollup
Aggregate a metric series into fixed time buckets (count, min, max, avg, sum, last), empty buckets included.
rollup in TypeScript
1.0.0
py rs ts
15 tests
health.news2 Unreviewed
NEWS2 early warning score from one set of observations: parameter scores, aggregate and RCP clinical risk band.
news2Score in TypeScript
1.0.1
py rs ts
45 tests
stats.moving-average
Simple or exponential moving average over a series, one value per full window, rounded to stated decimals.
movingAverage in TypeScript
2.0.0
py rs ts
24 tests
math.round-float
Round a float half away from zero to 0-12 decimal places, identically in TypeScript, Python and Rust.
roundFloat in TypeScript
1.0.0
py rs ts
22 tests
finance.ledger.journal-validate
Check a double-entry journal: debits equal credits, no zero or two-sided lines, one currency, well-formed account codes.
validateJournal in TypeScript
1.0.0
py rs ts
16 tests
finance.ledger.trial-balance
Trial balance from journal lines: debit or credit balance per account, and proof that debits equal credits.
trialBalance in TypeScript
1.0.0
py rs ts
13 tests
subscriptions.churn
Logo churn, gross and net revenue churn, and gross and net revenue retention for one period, in basis points.
churnMetrics in TypeScript
1.0.0
py rs ts
15 tests
subscriptions.ltv-cac
Customer lifetime value, LTV to CAC ratio and CAC payback months from ARPA, gross margin, churn and CAC.
ltvCac in TypeScript
1.0.0
py rs ts
14 tests
health.bmi Unreviewed
Adult body mass index (kg/m², 1 decimal place) and its NICE/WHO weight category.
bmi in TypeScript
1.0.1
py rs ts
22 tests
invest.portfolio-weights Unreviewed
Each holding's share of a portfolio and its drift from a target weight, in basis points, from exact arithmetic.
portfolioWeights in TypeScript
1.0.1
py rs ts
19 tests
retail.sales-tax-us Unreviewed
US sales tax on a sale: the state's base rate from dated data plus a local rate the caller supplies.
salesTaxUs in TypeScript
1.1.1
py rs ts
22 tests
math.rational
Exact fraction arithmetic, always reduced, for rates and ratios that must not drift.
A group of 8: calculateRational, rational, addRational, subtractRational, multiplyRational, divideRational, compareRational, rationalToInteger
2.0.0
py rs ts
86 tests
agri.yield-per-hectare
Crop yield per hectare and per acre from harvested quantity and field area in any area unit, exactly, as decimal text.
yieldPerHectare in TypeScript
1.0.1
py rs ts
19 tests
monitor.uptime-bars
One bar per UTC day for a status page's uptime history: seconds in each state, uptime and a colour state, oldest first.
uptimeBars in TypeScript
1.0.0
py rs ts
17 tests
todo.export-csv
Write todos as a CSV file (RFC 4180) with one column per field, for backups, spreadsheets and other apps.
exportCsv in TypeScript
1.0.0
py rs ts
14 tests
collections.sort-by
Stably sort records by one key, ascending or descending, with a total order across mixed types.
sortBy in TypeScript
1.0.0
py rs ts
21 tests
monitor.status-page
The overall state, headline and affected components at the top of a status page, from each component's state.
statusPage in TypeScript
1.0.0
py rs ts
14 tests
collections.group-by-key
Group records by the value at one key, preserving input order inside each group.
groupByKey in TypeScript
1.0.0
py rs ts
18 tests
todo.filter
The todos a list view shows: all, active or completed, optionally one tag, and a search box, in input order.
filterTodos in TypeScript
1.0.0
py rs ts
17 tests
todo.group-by-due
Split todos into Overdue, Today, Tomorrow, This week, Later, No date and Done sections, in that order.
A group of 2: groupByDue, groupByDueWithOrder
1.1.0
py rs ts
26 tests
todo.sort
Sort todos by manual order, due date, priority, creation time or title, stably, with sensible tie-breakers.
sortTodos in TypeScript
1.0.0
py rs ts
20 tests
todo.tag-counts
How many todos carry each tag, for a tag sidebar: most used first, open todos only unless asked.
tagCounts in TypeScript
1.0.0
py rs ts
10 tests
education.timetable-clash
Find timetable clashes: overlapping sessions that share a room, a teacher or a student group, in a fixed order.
timetableClashes in TypeScript
1.0.0
py rs ts
20 tests
collections.chunk
Split a list into consecutive batches of at most n items, in order; the last batch may be short.
chunk in TypeScript
1.0.0
py rs ts
11 tests
inventory.abc-classification
ABC classes by annual consumption value (Pareto), with configurable cut-offs such as 80/15/5 and deterministic ties.
abcClassification in TypeScript
1.0.0
py rs ts
17 tests
todo.summary
Counts for a todo list's header or footer: total, active, done, overdue, due today, percent done and "3 items left".
summariseTodos in TypeScript
1.0.0
py rs ts
13 tests
inventory.cycle-count-schedule
Cycle count schedule: spread each item's counts evenly over the working days of a period, by ABC class frequency.
cycleCountSchedule in TypeScript
1.0.0
py rs ts
17 tests
collections.paginate
Slice a list into a 1-based page and report the totals an API response needs.
paginate in TypeScript
1.0.0
py rs ts
18 tests
monitor.burn-rate-alert
Multiwindow, multi-burn-rate SLO alerting: which rules fire, from event counts per window (Google SRE workbook).
burnRateAlert in TypeScript
2.0.0
py rs ts
30 tests
collections.diff
Compare two lists of records by key: which were added, which removed, and which changed and in what fields.
diffByKey in TypeScript
1.0.0
py rs ts
18 tests
todo.recurrence-label
English text for a repeating todo's chip: "Every weekday", "Every 2 weeks on Monday", "Every month on the 31st".
recurrenceLabel in TypeScript
1.0.0
py rs ts
30 tests
stats.percentile
Percentile of a list of numbers by a named method: nearest-rank, or linear interpolation (R-7, Excel PERCENTILE.INC).
percentile in TypeScript
2.0.0
py rs ts
29 tests
education.fee-instalments
Tuition fee instalment schedule from a total, shares and due dates, exact to the penny.
feeInstalments in TypeScript
1.0.0
py rs ts
20 tests
charity.regular-giving-schedule
Collection dates for a regular gift: monthly, quarterly or annual on a day, clamped to short months, after a lead time.
regularGivingSchedule in TypeScript
1.0.0
py rs ts
19 tests
insurance.age-banding Unreviewed
Age at policy inception and the rating band it falls in, from a table of age bands.
ageBand in TypeScript
1.0.1
py rs ts
18 tests
monitor.incidents
Turn a series of up, degraded and down checks into incidents, ignoring runs too short to confirm.
findIncidents in TypeScript
1.0.0
py rs ts
19 tests
net.latency-summary
Summarise probe results: sent, received, loss, min/avg/max, p95 and jitter, in whole microseconds.
summariseLatency in TypeScript
1.0.0
py rs ts
16 tests
todo.next-occurrence
The next due date of a repeating todo once it is done: daily, weekdays, weekly, monthly or yearly, month-end safe.
nextOccurrence in TypeScript
1.0.0
py rs ts
24 tests
monitor.mttr
MTTR, MTBF, downtime and incident counts for a reporting window, from a list of incidents.
reliabilityStats in TypeScript
1.0.0
py rs ts
18 tests
monitor.status-code-summary
Count HTTP status codes by class (1xx to 5xx) and give the server error and client error rates in basis points.
summariseStatusCodes in TypeScript
1.0.0
py rs ts
12 tests
dates.recurrence
The next n dates of a repeating rule: monthly on a day, last weekday of the month, every k days or weeks, yearly.
recurrence in TypeScript
1.0.0
py rs ts
25 tests
monitor.heartbeat-check
A heartbeat's state as a check status for a status page: up, late as degraded, down as down, new as nothing yet.
heartbeatCheck in TypeScript
1.0.0
py rs ts
8 tests
energy.tariff-time-of-use
Cost half-hourly consumption against time-of-use rates: Economy 7 windows or Agile-style half-hourly prices.
timeOfUseCost in TypeScript
1.0.1
py rs ts
24 tests
todo.list
The to-do list reducer: add, edit, complete, remove, clear and reorder todos, each returning a new list.
A group of 8: addTodo, updateTodo, toggleTodo, removeTodo, clearCompleted, toggleAll, moveTodo, toggleAllMode
1.1.0
py rs ts
102 tests