Suites · dashboards
Dashboards and charts
Chart geometry as data in any language (scales, ticks, axes, lines, bars, pies, sparklines) plus the statistics and number formatting a dashboard shows.
47 capabilities (16 core, 31 optional) and 7 gaps, in build order. Put each line in the file that calls it, then fune build.
TypeScript Python Rust
1. Whole charts
Get complete chart geometry in one call, for the common charts.
charts.line-chart core
Plot area, number or date axes, gridlines, series paths, colours and legend for a line chart.
Complete line chart geometry as data: plot area, number or date axes, gridlines, series paths, colours, legend.
from fune.charts.line_chart import line_chart # charts.line-chart@^1
1.0.0
charts.bar-chart core
Grouped or stacked bar chart geometry: axes, gridlines, bars, colours and legend.
Complete bar chart geometry as data, grouped or stacked: plot area, axes, gridlines, bar rectangles, colours, legend.
from fune.charts.bar_chart import bar_chart # charts.bar-chart@^1
1.0.0
charts.sparkline optional
A sparkline path and end marker for a series in a small box.
A sparkline's SVG path and end marker from a series, fitted into a box, with gaps left as breaks.
from fune.charts.sparkline import sparkline # charts.sparkline@^1
1.0.0
2. Chart building blocks
Compose charts of your own from the same parts.
charts.scale core
Maps values to positions and back: linear, log, time, band and point scales, nice domains.
Map data values onto screen positions and back: linear, log, time, band and point scales, and nice domains.
from fune.charts.scale import linear_scale, invert_linear, nice_domain, log_scale, time_scale, band_scale, point_scale # charts.scale@^1
1.1.07 functions
charts.ticks core
Round tick steps and calendar ticks from days to years.
Axis ticks: a round step (1, 2 or 5 x 10^k), the ticks on it, and calendar ticks from days to years.
from fune.charts.ticks import tick_step, nice_ticks, time_tick_interval, time_ticks # charts.ticks@^1
1.0.04 functions
charts.axis core
Tick positions, labels and gridlines for number, time and category axes.
Axis geometry as data: tick positions, tick marks, label anchors and gridlines for number, time and category axes.
from fune.charts.axis import axis_from_ticks, number_axis, time_axis, band_axis, grid_lines # charts.axis@^1
1.0.15 functions
charts.shape optional
SVG paths for lines, areas, steps, curves, bars, arcs and pie slices.
SVG path strings for lines, areas, steps, monotone curves, bars, arcs and pie slices, identical in every language.
from fune.charts.shape import line_path, area_path, step_path, monotone_curve, bar_rects, arc_path, pie_angles # charts.shape@^1
1.0.17 functions
charts.stack optional
Stacks series on zero, normalised to 100% or diverging.
Stack several series for stacked bars and areas: on zero, normalised to 100%, or diverging around zero.
from fune.charts.stack import stack # charts.stack@^1
1.0.0
charts.layout optional
Plot area inside margins, legend rows, label collision avoidance.
Chart layout: the plot area inside margins, legend items wrapped into rows, and greedy label collision avoidance.
from fune.charts.layout import plot_area, legend_rows, avoid_collisions # charts.layout@^1
1.0.13 functions
charts.extent optional
Min and max of a series, skipping gaps.
The minimum and maximum of a series as [min, max], skipping gaps (null), or null when there is no value.
from fune.charts.extent import extent # charts.extent@^1
1.0.1
charts.histogram-bins optional
Bins values for a histogram (Sturges, Freedman-Diaconis or fixed width).
Bin values into histogram bins on round edges, by Sturges' rule, Freedman-Diaconis, or a fixed width.
from fune.charts.histogram_bins import histogram_bins # charts.histogram-bins@^1
1.0.0
charts.downsample optional
Thins a long series by LTTB so it draws fast but keeps its shape.
Reduce a long series to a few points that keep its visual shape, by Largest-Triangle-Three-Buckets (LTTB).
from fune.charts.downsample import downsample # charts.downsample@^1
1.0.0
3. Colour
Readable, colour-blind-safe colours.
charts.palette core
n colour-blind-safe series colours (Okabe-Ito or Tol bright).
A categorical palette of n colour-blind-safe colours for chart series: Okabe-Ito or Paul Tol's bright scheme.
from fune.charts.palette import palette # charts.palette@^1
1.0.0
charts.interpolate-color optional
Colour along a sequential or diverging ramp, for heatmaps.
The colour at a point along a sequential or diverging ramp, mixed in OKLab so steps look even; hex in, hex out.
from fune.charts.interpolate_color import interpolate_color # charts.interpolate-color@^1
1.0.0
charts.contrast optional
WCAG contrast ratio and the readable text colour on a background.
WCAG 2.x contrast ratio between two colours, and which text colour reads best on a background.
from fune.charts.contrast import contrast_ratio, readable_text_color # charts.contrast@^1
1.0.02 functions
charts.color optional
Hex to RGB and back, and sRGB to linear light.
Hex colours to RGB and back, and sRGB channels to linear light and back, identically in every language.
from fune.charts.color import parse_hex, to_hex, srgb_to_linear, linear_to_srgb # charts.color@^1
1.0.14 functions
5. Calendar arithmetic from dates-basics
Move and measure ISO dates exactly, with no date library and no clock reads.
dates.add-days core
Shifts a date by whole days, for due dates and windows.
Shift an ISO date by a whole number of days, forwards or backwards, with exact calendar arithmetic.
from fune.dates.add_days import add_days # dates.add-days@^1
1.0.0
dates.add-months core
Adds months clamping to month end, so 31 January plus a month is the end of February.
Add calendar months to an ISO date, clamping to the month end: 31 Jan + 1 month is 28 or 29 Feb.
from fune.dates.add_months import add_months # dates.add-months@^1
1.0.0
dates.days-between core
Signed calendar days between two dates, for ages of invoices and stays.
Calendar days from one ISO date to another, signed: negative when the second date is earlier.
from fune.dates.days_between import days_between # dates.days-between@^1
1.0.0
dates.month-boundaries core
First and last day of a date's month, for monthly periods and statements.
The first day, last day and length of the calendar month containing a date.
from fune.dates.month_boundaries import month_boundaries # dates.month-boundaries@^1
1.0.0
dates.day-of-week core
ISO weekday of a date, for weekend rules and opening hours.
The ISO 8601 day of the week for a date: 1 is Monday through 7 is Sunday.
from fune.dates.day_of_week import day_of_week # dates.day-of-week@^1
1.0.0
dates.is-leap-year optional
Whether a year is a leap year, for 365/366-day calculations.
Whether a year is a Gregorian leap year: every 4th, except centuries, except every 400th.
from fune.dates.is_leap_year import is_leap_year # dates.is-leap-year@^1
1.0.0
dates.overlap optional
Days two date ranges share, for prorating and clash checks.
Days two date ranges have in common, with the end of each range stated as inclusive or exclusive.
from fune.dates.overlap import overlap_days # dates.overlap@^1
1.0.0
dates.age optional
Age in whole years on a date, handling 29 February birthdays.
Age in whole years on a given date, with 29 February birthdays ageing on 1 March in other years.
from fune.dates.age import age # dates.age@^1
1.0.0
6. Periods and reporting dates from dates-basics
Put dates into the periods reports are grouped by.
dates.quarter core
Calendar and fiscal quarter of a date for any year-start month.
Calendar quarter and fiscal quarter of a date, with the fiscal year and quarter date ranges, for any start month.
from fune.dates.quarter import quarter # dates.quarter@^1
1.0.0
dates.week-number optional
ISO week number and week-year, for weekly reports.
ISO 8601 week number and week-numbering year of a date: weeks start Monday, week 1 holds the first Thursday.
from fune.dates.week_number import week_number # dates.week-number@^1
1.0.0
dates.day-count-fraction optional
Year fraction by ACT/365F, ACT/360, 30/360 or ACT/ACT, for interest periods.
Year fraction between two dates by ACT/365F, ACT/360, 30/360, 30E/360 or ACT/ACT ISDA, as an exact fraction.
from fune.dates.day_count_fraction import day_count_fraction # dates.day-count-fraction@^1
1.0.0
7. Working days and holidays from dates-basics
Skip weekends and public holidays when counting or adding days.
dates.bank-holidays core
UK bank holidays for a region and year, as gov.uk publishes them.
UK bank and public holidays for a region and year, as published by gov.uk, including one-off holidays.
from fune.dates.bank_holidays import bank_holidays # dates.bank-holidays@^1
1.0.1
dates.add-business-days core
Moves a date by working days, skipping weekends and a holiday list.
Move a date forward or back by working days, skipping weekends and a caller-supplied holiday list.
from fune.dates.add_business_days import add_business_days # dates.add-business-days@^1
1.0.0
dates.business-days-between core
Working days between two dates, for SLAs and notice periods.
Working days between two dates, excluding weekends and a caller-supplied holiday list.
from fune.dates.business_days_between import business_days_between # dates.business-days-between@^1
1.0.0
8. Repeating schedules from dates-basics
Generate the dates of something that repeats.
dates.recurrence optional
The next n dates of a rule: monthly on the 31st, last Friday, every two weeks.
The next n dates of a repeating rule: monthly on a day, last weekday of the month, every k days or weeks, yearly.
from fune.dates.recurrence import recurrence # dates.recurrence@^1
1.0.0
9. Times and durations from dates-basics
Work with times of day, durations and timestamps.
time.duration optional
Parses and adds durations like 1h30m in whole minutes, and formats the total.
Parse durations written as 1h30m, 90m or 01:30, add them up in whole minutes, and format the total.
from fune.time.duration import duration # time.duration@^1
1.0.0
time.minutes-between optional
Minutes between two local date-times, across midnight.
Minutes from one local date and time to another, correct across midnight; wall-clock time, no time zones.
from fune.time.minutes_between import minutes_between # time.minutes-between@^1
1.0.0
time.round-to-increment optional
Rounds minutes to a billing increment such as 6 or 15.
Round a duration in minutes to a billing increment such as 6 or 15 minutes, up, down or to nearest.
from fune.time.round_to_increment import round_to_increment # time.round-to-increment@^1
1.0.0
time.iso-to-unix optional
RFC 3339 timestamps to Unix seconds.
An RFC 3339 timestamp with a Z or offset, such as 2026-09-26T13:00:00+01:00, to Unix time in whole seconds.
from fune.time.iso_to_unix import iso_to_unix # time.iso-to-unix@^1
1.0.0
time.unix-to-iso optional
Unix seconds to an ISO 8601 UTC timestamp.
Unix time in seconds to an ISO 8601 UTC timestamp such as 2026-09-26T12:00:00Z, for years 0001 to 9999.
from fune.time.unix_to_iso import unix_to_iso # time.unix-to-iso@^1
1.0.0
time.countdown optional
Seconds left until a moment and a 4:05 style timer text.
Seconds left until a Unix time, whether it has passed, and a timer text like 4:05, for tokens or retry waits.
from fune.time.countdown import countdown # time.countdown@^1
1.0.0
Gaps What this kind of app usually needs that Functional Weave does not have yet: write these yourself, or use a service.
rendering Drawing: caps returns numbers and SVG path strings; putting them in SVG, canvas or a chart component is yours.interactivity Tooltips, zoom, pan, brushing and animation.data-queries Querying and aggregating the data at source (SQL, a metrics store); monitor.rollup covers time buckets in memory.pie-donut-chart A complete pie or donut chart: charts.shape gives pieAngles and arcPath, assembling legend and labels is yours.time-zones Time axes in local time zones: charts work in UTC dates and times.locale-formatting Showing dates in a user's language and format ("3 octobre 2026"): caps returns ISO dates, not localised text.non-uk-holidays Public holidays outside the UK: dates.bank-holidays is UK only; pass another country's list to the working-day functions yourself.