From 3125352d5a2339b17628818c8490521b360f7163 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Tue, 5 Apr 2022 22:29:21 +0800 Subject: [PATCH] Bug 798499 - Expense Chart data tables include extra columns of data Because all-data was shortened when it exceeds the max-sliecs, but list-of-rows and row-totals were not redefined. Delay list-of-rows and row-totals until after all-data is pruned. --- gnucash/report/reports/standard/category-barchart.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnucash/report/reports/standard/category-barchart.scm b/gnucash/report/reports/standard/category-barchart.scm index 283e33bdb5..6e35961ddc 100644 --- a/gnucash/report/reports/standard/category-barchart.scm +++ b/gnucash/report/reports/standard/category-barchart.scm @@ -526,10 +526,8 @@ Please deselect the accounts with negative balances.")) (list-head dates-list (1- (length dates-list))) dates-list)) (date-string-list (map qof-print-date dates-list)) - (list-of-rows (apply zip (map cadr all-data))) - - ;; total amounts - (row-totals (map (cut fold + 0 <>) list-of-rows))) + (list-of-rows #f) + (row-totals #f)) ;; Set chart title, subtitle etc. (gnc:html-chart-set-type! @@ -578,6 +576,8 @@ Please deselect the accounts with negative balances.")) (gnc:report-anchor-text (gnc:make-report reportguid options)))))) + (set! list-of-rows (apply zip (map cadr all-data))) + (set! row-totals (map (cut fold + 0 <>) list-of-rows)) (gnc:report-percent-done 92) (for-each