Change account-piecharts and html-piechart

Change account-piecharts.scm to use the modified htm-piechart.scm that
now can use plot size percentages.
This commit is contained in:
Robert Fewell 2016-11-28 19:28:41 +00:00 committed by Geert Janssens
parent 211b3ab10e
commit b060520859
2 changed files with 11 additions and 6 deletions

View File

@ -53,7 +53,7 @@
(record-constructor <html-piechart>)) (record-constructor <html-piechart>))
(define (gnc:make-html-piechart) (define (gnc:make-html-piechart)
(gnc:make-html-piechart-internal -1 -1 #f #f #f #f #f #f #f #f #f #f #f)) (gnc:make-html-piechart-internal '(pixels . -1) '(pixels . -1) #f #f #f #f #f #f #f #f #f #f #f))
(define gnc:html-piechart-data (define gnc:html-piechart-data
(record-accessor <html-piechart> 'data)) (record-accessor <html-piechart> 'data))
@ -212,10 +212,15 @@
(push (gnc:html-css-include "jqplot/jquery.jqplot.css")) (push (gnc:html-css-include "jqplot/jquery.jqplot.css"))
(push "<div id=\"")(push chart-id)(push "\" style=\"width:") (push "<div id=\"")(push chart-id)(push "\" style=\"width:")
(push (gnc:html-piechart-width piechart)) (push (cdr (gnc:html-piechart-width piechart)))
(if (eq? 'pixels (car (gnc:html-piechart-width piechart)))
(push "px;height:") (push "px;height:")
(push (gnc:html-piechart-height piechart)) (push "%;height:"))
(push (cdr (gnc:html-piechart-height piechart)))
(if (eq? 'pixels (car (gnc:html-piechart-height piechart)))
(push "px;\"></div>\n") (push "px;\"></div>\n")
(push "%;\"></div>\n"))
(push "<script id=\"source\">\n$(function () {") (push "<script id=\"source\">\n$(function () {")
(push "var data = [];\n") (push "var data = [];\n")

View File

@ -183,7 +183,7 @@ balance at a given time"))
(gnc:options-add-plot-size! (gnc:options-add-plot-size!
options gnc:pagename-display options gnc:pagename-display
optname-plot-width optname-plot-height "d" 500 350) optname-plot-width optname-plot-height "d" (cons 'percent 100.0) (cons 'percent 100.0))
(gnc:options-add-sort-method! (gnc:options-add-sort-method!
options gnc:pagename-display options gnc:pagename-display