From ea1d1716a810bc6a7e3723deb2bb7c4872d425ca Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sat, 5 Jul 2025 18:34:37 +0800 Subject: [PATCH] [html-chart] expose gnc:html-chart-set-x-axis-type! Centralise to ease chartjs upgrade. The option path changes as follows: '(options scales xAxes (0) type) in chartjs-2 '(options scales x type) in chartjs-3 --- gnucash/report/html-chart.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnucash/report/html-chart.scm b/gnucash/report/html-chart.scm index 825f95efbe..081b076d5d 100644 --- a/gnucash/report/html-chart.scm +++ b/gnucash/report/html-chart.scm @@ -61,6 +61,7 @@ (export gnc:html-chart-set-axes-display!) (export gnc:html-chart-set-custom-y-axis-ticks?!) (export gnc:html-chart-clear-data-series!) +(export gnc:html-chart-set-x-axis-type!) (export gnc:html-chart-set-x-axis-label!) (export gnc:html-chart-set-stacking?!) (export gnc:html-chart-set-grid?!) @@ -286,6 +287,9 @@ (gnc:html-chart-set! chart '(options scales xAxes (0) display) display?) (gnc:html-chart-set! chart '(options scales yAxes (0) display) display?)) +(define (gnc:html-chart-set-x-axis-type! chart type) + (gnc:html-chart-set! chart '(options scales xAxes (0) type) type)) + ;; e.g.: ;; (gnc:html-chart-add-data-series! chart "label" list-of-numbers color ;; 'fill #t