Skip to main content

Module adapters

Module adapters 

Source
Expand description

Turn view projections into chart specs. Adapters are pure functions that handle top-N clipping, multi-currency scaling decisions, and layout choices (x-axis assignment, series arrangement) so renderers only have to draw.

Structs§

ActivityChartOpts
BalanceChartOpts
BreakdownChartOpts

Enums§

SortOrder
Sort key applied to a ranked set of rows. Shared by the balance adapter and (via the web handler) the balance table rendering — keeping them on one enum means the chart can’t drift from the table ordering.

Functions§

activity_chart
Activity chart: x = period label, one series per group label, plus an optional Net series. Picks a single commodity when multiple are present and notes the omission.
balance_chart
Balance chart: one series per commodity, x = top-level account names. When more than one commodity is present and the top_n most-active accounts span several commodities, we still render all bars — each series places a bar in the x-slot for its account and zero elsewhere, so a mixed-currency report reads as a grouped / stacked bar chart.
breakdown_chart
Breakdown chart. Two shapes depending on whether the breakdown has period grouping: