Functional Weave
Code in TypeScript

Results for “charts”

62 capabilities

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
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
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
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
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
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
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
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
math.round-float
Round a float half away from zero to 0-12 decimal places, identically in TypeScript, Python and Rust.
roundFloat in TypeScript
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
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
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
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
todo.sort
Sort todos by manual order, due date, priority, creation time or title, stably, with sensible tie-breakers.
sortTodos in TypeScript
todo.tag-counts
How many todos carry each tag, for a tag sidebar: most used first, open todos only unless asked.
tagCounts in TypeScript
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
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