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§
Enums§
- Sort
Order - 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_nmost-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: