By: Tom Sydney Kerckhove <syd@cs-syd.eu>
centjes-chart Tier 1: enforce alignment, select by account type, data-driven render Address the review's structural gaps: - Make the days/series alignment a real invariant: ChartReport gets a Validity instance asserting every series has one value per day, an aligned-by- construction GenValid generator, genValidSpec, and a shouldBeInvalid test that proves the check is non-vacuous. - Select accounts by declared AccountType (produceChartReport takes [AccountType]; the assets chart passes [AccountTypeAssets]) instead of a name substring, so 'the assets chart' means assets. - Pick the chart primitive from the data: stacked area only when every value is non-negative, overlaid lines otherwise, so a signed series (e.g. an overdraft) no longer renders a misleading stack. - Test the rendering math: stackBands and lineSeries are exported and property- tested (bands partition each day's total from zero; one point per day).