diff --git a/src/report/report-system/html-barchart.scm b/src/report/report-system/html-barchart.scm index 79ffacb8a5..c215c5220e 100644 --- a/src/report/report-system/html-barchart.scm +++ b/src/report/report-system/html-barchart.scm @@ -356,7 +356,10 @@ (push ");\n") (push "series.push({ label: \"") (push label) - (push "\"});\n\n")))) + (push "\"});\n\n"))) + ; Use a unique chart-id for each chart. This prevents chart + ; clashed on multi-column reports + (chart-id (string-append "chart-" (number->string (random 999999))))) (if (and (list? data) (not (null? data)) (gnc:not-all-zeros data)) @@ -370,7 +373,7 @@ (push (gnc:html-js-include "jqplot/jqplot.canvasAxisTickRenderer.js")) (push (gnc:html-css-include "jqplot/jquery.jqplot.css")) - (push "
string (random 999999))))) (if (and (list? data) (not (null? data)) (gnc:not-all-zeros data)) @@ -400,7 +403,7 @@ (push (gnc:html-js-include "jqplot/jqplot.canvasAxisTickRenderer.js")) (push (gnc:html-css-include "jqplot/jquery.jqplot.css")) - (push "
string (random 999999))))) (if (and (list? data) (not (null? data))) (begin @@ -212,7 +215,7 @@ (push (gnc:html-js-include "jqplot/jqplot.pieRenderer.js")) (push (gnc:html-css-include "jqplot/jquery.jqplot.css")) - (push "
")) (begin (gnc:warn "null-data, not rendering piechart") " ")) diff --git a/src/report/report-system/html-scatter.scm b/src/report/report-system/html-scatter.scm index b3b161fb61..deaa13c258 100644 --- a/src/report/report-system/html-scatter.scm +++ b/src/report/report-system/html-scatter.scm @@ -144,7 +144,10 @@ (y-label (gnc:html-scatter-y-axis-label scatter)) (data (gnc:html-scatter-data scatter)) (marker (gnc:html-scatter-marker scatter)) - (markercolor (string-append "#" (gnc:html-scatter-markercolor scatter)))) + (markercolor (string-append "#" (gnc:html-scatter-markercolor scatter))) + ; Use a unique chart-id for each chart. This prevents chart + ; clashed on multi-column reports + (chart-id (string-append "chart-" (number->string (random 999999))))) (if (and (list? data) (not (null? data))) (begin @@ -152,7 +155,7 @@ (push (gnc:html-js-include "jqplot/jquery.jqplot.js")) (push (gnc:html-css-include "jqplot/jquery.jqplot.css")) - (push "
")) (begin