mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[html-chart] use gensym instead of guid
... because technically guids should be freed when not needed. gensym generates a guaranteed unique string with prefix within program lifecycle.
This commit is contained in:
parent
b72014c7de
commit
d810e82f98
@ -406,7 +406,7 @@ document.getElementById(chartid).onclick = function(evt) {
|
||||
(push (lambda (l) (set! retval (cons l retval))))
|
||||
;; Use a unique chart-id for each chart. This prevents charts
|
||||
;; clashing on multi-column reports
|
||||
(id (guid-new-return)))
|
||||
(id (symbol->string (gensym "chart"))))
|
||||
|
||||
(push (gnc:html-js-include
|
||||
(gnc-path-find-localized-html-file "chartjs/Chart.bundle.min.js")))
|
||||
@ -417,12 +417,12 @@ document.getElementById(chartid).onclick = function(evt) {
|
||||
(size->str (gnc:html-chart-width chart))
|
||||
(size->str (gnc:html-chart-height chart))))
|
||||
(push (format #f "<a id='jump-~a' href='' style='display:none'></a>\n" id))
|
||||
(push (format #f "<canvas id='chart-~a'></canvas>\n" id))
|
||||
(push (format #f "<canvas id=~s></canvas>\n" id))
|
||||
(push "</div>\n")
|
||||
(push (format #f "<script id='script-~a'>\n" id))
|
||||
(push (format #f "var curriso = ~s;\n" (gnc:html-chart-currency-iso chart)))
|
||||
(push (format #f "var currsym = ~s;\n" (gnc:html-chart-currency-symbol chart)))
|
||||
(push (format #f "var chartid = 'chart-~a';\n" id))
|
||||
(push (format #f "var chartid = ~s;\n" id))
|
||||
(push (format #f "var jumpid = 'jump-~a';\n" id))
|
||||
(push (format #f "var loadstring = ~s;\n" (G_ "Load")))
|
||||
(push (format #f "var chartjsoptions = ~a;\n\n"
|
||||
|
Loading…
Reference in New Issue
Block a user