Skip to content

Commit ea1d171

Browse files
[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
1 parent 368b74c commit ea1d171

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gnucash/report/html-chart.scm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
(export gnc:html-chart-set-axes-display!)
6262
(export gnc:html-chart-set-custom-y-axis-ticks?!)
6363
(export gnc:html-chart-clear-data-series!)
64+
(export gnc:html-chart-set-x-axis-type!)
6465
(export gnc:html-chart-set-x-axis-label!)
6566
(export gnc:html-chart-set-stacking?!)
6667
(export gnc:html-chart-set-grid?!)
@@ -286,6 +287,9 @@
286287
(gnc:html-chart-set! chart '(options scales xAxes (0) display) display?)
287288
(gnc:html-chart-set! chart '(options scales yAxes (0) display) display?))
288289

290+
(define (gnc:html-chart-set-x-axis-type! chart type)
291+
(gnc:html-chart-set! chart '(options scales xAxes (0) type) type))
292+
289293
;; e.g.:
290294
;; (gnc:html-chart-add-data-series! chart "label" list-of-numbers color
291295
;; 'fill #t

0 commit comments

Comments
 (0)