[html-chart] use gnc:html-js-include to import js

This fix url to file:/// for windows to render charts properly.
This commit is contained in:
Christopher Lam 2019-06-18 18:24:46 +08:00
parent d90f843a1a
commit 7102b1d2f0

View File

@ -452,8 +452,8 @@ document.getElementById(chartid).onclick = function(evt) {
;; clashing on multi-column reports
(id (guid-new-return)))
(push (format #f "<script language='javascript' type='text/javascript' src='file://~a'></script>\n"
(gnc-path-find-localized-html-file "chartjs/Chart.bundle.min.js")))
(push (gnc:html-js-include
(gnc-path-find-localized-html-file "chartjs/Chart.bundle.min.js")))
(push (format #f "<div style='width:~a;height:~a;'>\n"
(size->str (gnc:html-chart-width chart))