Enhancement - New global properties for CHARTS (GC's level)

This one a is quite an improvement on customisation of reports/charts. User can decide now what kind of point style should be used, including size, hover range and such.

On top of that:
- some tooltip improvements were made as well, including configurable one in GC's Properties.
- Price Scatterplot - fixed colors, got rid of a superfluous markers
- global defaults to be tuned in the next batch

Settings available at: GnuCash -> Edit -> Preferences -> Reports
This commit is contained in:
PRG-112 committed 2026-08-31 20:34:24 +02:00
1 parent 284e7434ce
commit f5f133e104
9 files changed
+434 -36

No files matched your search

+6
View File
@@ -1359,6 +1359,12 @@ gnc_preferences_dialog_create (GtkWindow *parent)
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "save_on_close_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "date_backmonth_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "default_zoom_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "default_chart_point_style_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "default_chart_point_size_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "default_chart_point_size_hover_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "default_chart_tooltip_engage_radius_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "default_chart_caret_size_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "chart_point_style_list");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "max_transactions_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "key_length_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "new_search_limit_adj");
@@ -349,6 +349,11 @@
</key>
</schema>
<enum id="org.gnucash.GnuCash.general.report.TooltipPosition">
<value nick="average" value="0"/>
<value nick="nearest" value="1"/>
</enum>
<schema id="org.gnucash.GnuCash.general.report" path="/org/gnucash/GnuCash/general/report/">
<key name="use-new-window" type="b">
<default>false</default>
@@ -377,6 +382,36 @@
This option allows you to scale reports up by the set factor.
For example setting this to 2.0 will display reports at twice their typical size.</description>
</key>
<key name="chart-point-style" type="i">
<default>7</default>
<summary>A chart's point style.</summary>
<description>This setting specifies what kind of a point style should charts use. In previous versions it was always the circle, as of now it is confiugrable to chose among varius rectangles, triangles, and such. Only applicable to line charts.</description>
</key>
<key name="chart-point-size" type="i">
<default>4</default>
<summary>A chart's point size.</summary>
<description>This setting specifies the default point's size (in pixels) displayed in charts. Only applicable to line charts.</description>
</key>
<key name="chart-point-size-hover" type="i">
<default>9</default>
<summary>A chart's hovered-point size.</summary>
<description>This setting specifies the hovered point's size (in pixels) displayed in charts. It tends to be bigger than the default (i.e. not hovered over) size. Only applicable to line charts.</description>
</key>
<key name="chart-tooltip-engage-radius" type="i">
<default>7</default>
<summary>A hover radius that would engage a tooltip.</summary>
<description>This setting specifies the point's hover radius (in pixels) which translates into the proximity of which the point / tooltip will be engaged. If set to zero, the user must precisely aim at that point.</description>
</key>
<key name="chart-tooltip-caret-size" type="i">
<default>10</default>
<summary>An arrow size (caret) coming out of a tooltip's body.</summary>
<description>This setting specifies the size (in pixels) of an arrow (caret) that extends from a tooltip's body toward the data point. On a regular basis, a very small value - this setting's default has increased it significantly.</description>
</key>
<key name="chart-tooltip-position" enum="org.gnucash.GnuCash.general.report.TooltipPosition">
<default>'nearest'</default>
<summary>"Jump" behaviour when there are multiple splits</summary>
<description>Select how the "Jump" operation should behave when a transaction has multiple splits.</description>
</key>
<child name="pdf-export" schema="org.gnucash.GnuCash.general.report.pdf-export"/>
</schema>
<schema id="org.gnucash.GnuCash.general.report.pdf-export" path="/org/gnucash/GnuCash/general/report/pdf-export/">
+312
View File
@@ -120,6 +120,71 @@
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="default_chart_point_size_adj">
<property name="lower">1</property>
<property name="upper">25</property>
<property name="value">4</property>
<property name="step-increment">1</property>
<property name="page-increment">3</property>
</object>
<object class="GtkAdjustment" id="default_chart_point_size_hover_adj">
<property name="lower">1</property>
<property name="upper">50</property>
<property name="value">9</property>
<property name="step-increment">1</property>
<property name="page-increment">3</property>
</object>
<object class="GtkAdjustment" id="default_chart_tooltip_engage_radius_adj">
<property name="lower">1</property>
<property name="upper">100</property>
<property name="value">7</property>
<property name="step-increment">1</property>
<property name="page-increment">3</property>
</object>
<object class="GtkAdjustment" id="default_chart_caret_size_adj">
<property name="lower">1</property>
<property name="upper">50</property>
<property name="value">10</property>
<property name="step-increment">1</property>
<property name="page-increment">3</property>
</object>
<object class="GtkListStore" id="chart_point_style_list">
<columns>
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Circle</col>
</row>
<row>
<col id="0" translatable="yes">Cross</col>
</row>
<row>
<col id="0" translatable="yes">Cross - rotated</col>
</row>
<row>
<col id="0" translatable="yes">Dash</col>
</row>
<row>
<col id="0" translatable="yes">Line</col>
</row>
<row>
<col id="0" translatable="yes">Rectangle</col>
</row>
<row>
<col id="0" translatable="yes">Rectangle - rounded</col>
</row>
<row>
<col id="0" translatable="yes">Rectangle - rotated</col>
</row>
<row>
<col id="0" translatable="yes">Star</col>
</row>
<row>
<col id="0" translatable="yes">Triangle</col>
</row>
</data>
</object>
<object class="GtkDialog" id="separator_validation_dialog">
<property name="can-focus">False</property>
<property name="modal">True</property>
@@ -3400,6 +3465,253 @@ many months before the current month</property>
<property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label-tc-sep">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label-tc-1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Line Charts</property>
<style>
<class name="gnc-class-strong"/>
</style>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">10</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Point style</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">11</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="pref/general.report/chart-point-style">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="has-tooltip">True</property>
<property name="tooltip-markup">Chart Point Style</property>
<property name="tooltip-text" translatable="yes">Which style should represent a data point. Only applicable to line charts. </property>
<property name="model">chart_point_style_list</property>
<property name="active">7</property>
<child>
<object class="GtkCellRendererText" id="tc-point-style-renderer"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">11</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Point size</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">12</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="pref/general.report/chart-point-size">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="tooltip-text" translatable="yes">This setting specifies the default point's size (in pixels) displayed in charts. Only applicable to line charts.</property>
<property name="halign">start</property>
<property name="text">1</property>
<property name="adjustment">default_chart_point_size_adj</property>
<property name="digits">0</property>
<property name="value">1</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">12</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Point hovered size</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">13</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="pref/general.report/chart-point-size-hover">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="tooltip-text" translatable="yes">This setting specifies the hovered point's size (in pixels) displayed in charts. It tends to be bigger than the default (i.e. not hovered over) size. Only applicable to line charts.</property>
<property name="halign">start</property>
<property name="text">1</property>
<property name="adjustment">default_chart_point_size_hover_adj</property>
<property name="digits">0</property>
<property name="value">1</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">13</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label-tc-sep2">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">14</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label-tc-2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Tooltip</property>
<style>
<class name="gnc-class-strong"/>
</style>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">15</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Engage within this radius</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">16</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="pref/general.report/chart-tooltip-engage-radius">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="tooltip-text" translatable="yes">This setting specifies the point's hover radius (in pixels) which translates into the proximity of which the point / tooltip will be engaged. If set to zero, the user must precisely aim at that point.</property>
<property name="halign">start</property>
<property name="text">1</property>
<property name="adjustment">default_chart_tooltip_engage_radius_adj</property>
<property name="digits">0</property>
<property name="value">1</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">16</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Pointing arrow (caret) size</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">17</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="pref/general.report/chart-tooltip-caret-size">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="tooltip-text" translatable="yes">This setting specifies the size (in pixels) of an arrow (caret) that extends from a tooltip's body toward the data point. On a regular basis, a very small value - this setting's default has increased it significantly.</property>
<property name="halign">start</property>
<property name="text">1</property>
<property name="adjustment">default_chart_caret_size_adj</property>
<property name="digits">0</property>
<property name="value">1</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">17</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Position (for grouped only)</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">18</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="pref/general.report/chart-tooltip-position=average">
<property name="label" translatable="yes">average</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="has-tooltip">True</property>
<property name="tooltip-markup">Show tooltip at the AVERAGE value (i.e. in between) of engaged entry/entries. Only applicable to the grouped/indexed type of a tooltip.</property>
<property name="tooltip-text" translatable="yes">Show tooltip at the AVERAGE value (i.e. in between) of engaged entry/entries. Only applicable to the grouped/indexed type of a tooltip.</property>
<property name="halign">start</property>
<property name="use-underline">True</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
<property name="group">pref/general.report/chart-tooltip-position=nearest</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">18</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="pref/general.report/chart-tooltip-position=nearest">
<property name="label" translatable="yes">nearest</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="has-tooltip">True</property>
<property name="tooltip-markup">Show tooltip NEAREST to value of engaged entry/entries. Only applicable to the grouped/indexed type of a tooltip.</property>
<property name="tooltip-text" translatable="yes">Show tooltip NEAREST to value of engaged entry/entries. Only applicable to the grouped/indexed type of a tooltip.</property>
<property name="halign">start</property>
<property name="use-underline">True</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
<property name="group">pref/general.report/chart-tooltip-position=nearest</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">19</property>
</packing>
</child>
<child>
<placeholder/>
</child>
+28 -1
View File
@@ -69,6 +69,7 @@
(export gnc:html-chart-set-grid?!)
(export gnc:html-chart-set-y-axis-label!)
(export gnc:html-chart-add-data-series!)
(export gnc:html-chart-apply-preferences-report!)
(define gnc:showTooltipNonZerOnly #f)
@@ -214,7 +215,9 @@
(cons 'line (list
(cons 'tension 0)))
(cons 'point (list
(cons 'pointStyle #f)))))
(cons 'pointStyle #f)
(cons 'hoverBorderColor 'black)
(cons 'hoverBorderWidth 1)))))
(cons 'tooltips (list
(cons 'mode 'index)
(cons 'intersect #f)
@@ -303,6 +306,30 @@
(define (gnc:html-chart-set-tooltip-non-zero-only! chart nonZeroOnly)
(gnc:html-chart-set! chart '(options tooltips showNonZeroOnly) nonZeroOnly))
(define (gnc:html-chart-apply-preferences-report! chart)
(gnc:html-chart-set! chart '(options elements point pointStyle)
(case (gnc-prefs-get-int "general.report" "chart-point-style")
((0) "circle") ((1) "cross") ((2) "crossRot")
((3) "dash") ((4) "line") ((5) "rect")
((6) "rectRounded") ((7) "rectRot") ((8) "star")
((9) "triangle") (else "circle")))
(gnc:html-chart-set! chart '(options elements point radius)
(gnc-prefs-get-int "general.report" "chart-point-size"))
(gnc:html-chart-set! chart '(options elements point hoverRadius)
(gnc-prefs-get-int "general.report" "chart-point-size-hover"))
(gnc:html-chart-set! chart '(options elements point hitRadius)
(gnc-prefs-get-int "general.report" "chart-tooltip-engage-radius"))
(gnc:html-chart-set! chart '(options tooltips caretSize)
(gnc-prefs-get-int "general.report" "chart-tooltip-caret-size"))
(gnc:html-chart-set! chart '(options tooltips position)
(gnc-prefs-get-string "general.report" "chart-tooltip-position"))
)
;; e.g.:
;; (gnc:html-chart-add-data-series! chart "label" list-of-numbers color
;; 'fill #t
@@ -339,6 +339,9 @@ balance at a given time"))
(gnc-account-get-children-sorted
(gnc-get-current-root-account)))))
;; apply default settings from preferences
(gnc:html-chart-apply-preferences-report! chart)
;; Returns true if the account a was selected in the account
;; selection option.
(define (show-acct? a)
@@ -263,6 +263,9 @@ developing over time"))
(gnc-account-get-children-sorted
(gnc-get-current-root-account)))))
;; apply default settings from preferences
(gnc:html-chart-apply-preferences-report! chart)
;; Returns true if the account a was selected in the account
;; selection option.
(define (show-acct? a)
@@ -540,6 +543,19 @@ Please deselect the accounts with negative balances."))
(gnc:html-chart-set-tooltip-indexed?! chart tooltip-indexed)
(gnc:html-chart-set-tooltip-non-zero-only! chart (get-option gnc:pagename-display optname-tooltip-non-zero-only))
;; tailor applied GC's preferences toward this particular chart
(let ((isAverage (string=? (gnc-prefs-get-string "general.report" "chart-tooltip-position") "average"))
(pointSize (gnc-prefs-get-int "general.report" "chart-point-size"))
(pointSizeH (gnc-prefs-get-int "general.report" "chart-point-size-hover"))
(isLineChart (if (eq? chart-type 'linechart) #t #f))
)(
if (or (not isLineChart) (and tooltip-indexed isAverage isLineChart))
(gnc:html-chart-set! chart '(options tooltips caretPadding) 0)
(if tooltip-indexed
(gnc:html-chart-set! chart '(options tooltips caretPadding) (+ pointSize 2))
(gnc:html-chart-set! chart '(options tooltips caretPadding) (+ pointSizeH 2))
)))
(gnc:html-chart-set-data-labels! chart date-string-list)
(gnc:html-chart-set-y-axis-label!
chart (if ratio-chart? "Ratio"
+16 -13
View File
@@ -56,8 +56,6 @@
(define optname-line-width (N_ "Line Width"))
(define opthelp-line-width (N_ "Set line width in pixels."))
(define optname-markers (N_ "Data markers?"))
(define optname-tooltip-indexed (N_ "Show a grouped (indexed) tooltip"))
(define optname-tooltip-non-zero-only (N_ "Show only non-zero values in a tooltip"))
@@ -143,12 +141,7 @@
;; gnc:pagename-display optname-x-grid
;; "g" (N_ "Add vertical grid lines.")
;; #f))
(gnc-register-simple-boolean-option options
gnc:pagename-display optname-markers
"g" (N_ "Display a mark for each data point.")
#t)
))
))
(gnc-register-simple-boolean-option options
gnc:pagename-display optname-tooltip-indexed
@@ -198,8 +191,6 @@
(tooltip-indexed (get-option gnc:pagename-display optname-tooltip-indexed))
(height (get-option gnc:pagename-display optname-plot-height))
(width (get-option gnc:pagename-display optname-plot-width))
(markers (and linechart?
(if (get-option gnc:pagename-display optname-markers) 3 0)))
(line-width (and linechart?
(get-option gnc:pagename-display optname-line-width)))
(y-grid (or (not linechart?) (get-option gnc:pagename-display optname-y-grid)))
@@ -219,6 +210,9 @@
(document (gnc:make-html-document))
(chart (gnc:make-html-chart)))
;; apply default settings from preferences
(gnc:html-chart-apply-preferences-report! chart)
;; This exchanges the commodity-collector 'c' to one single
;; 'report-currency' according to the exchange-fn. Returns an
;; amount.
@@ -330,6 +324,18 @@
(gnc:html-chart-set-tooltip-indexed?! chart tooltip-indexed)
(gnc:html-chart-set-tooltip-non-zero-only! chart (get-option gnc:pagename-display optname-tooltip-non-zero-only))
;; tailor applied GC's preferences toward this particular chart
(let ((isAverage (string=? (gnc-prefs-get-string "general.report" "chart-tooltip-position") "average"))
(pointSize (gnc-prefs-get-int "general.report" "chart-point-size"))
(pointSizeH (gnc-prefs-get-int "general.report" "chart-point-size-hover"))
)(
if (or (not linechart?) (and tooltip-indexed isAverage linechart?))
(gnc:html-chart-set! chart '(options tooltips caretPadding) 0)
(if tooltip-indexed
(gnc:html-chart-set! chart '(options tooltips caretPadding) (+ pointSize 2))
(gnc:html-chart-set! chart '(options tooltips caretPadding) (+ pointSizeH 2))
)))
(gnc:html-chart-set-y-axis-label!
chart (gnc-commodity-get-mnemonic report-currency))
(gnc:html-chart-set-grid?! chart y-grid)
@@ -347,7 +353,6 @@
minuend-balances
"#0074D9"
'fill (not linechart?)
'pointRadius markers
'borderWidth line-width
'urls (gnc:make-report-anchor
(if inc-exp?
@@ -368,7 +373,6 @@
(map - subtrahend-balances)
"#FF4136"
'fill (not linechart?)
'pointRadius markers
'borderWidth line-width
'urls (gnc:make-report-anchor
(if inc-exp?
@@ -390,7 +394,6 @@
difference-balances
"#2ECC40"
'fill (not linechart?)
'pointRadius markers
'borderWidth line-width))
;; Test for all-zero data here.
@@ -43,7 +43,6 @@
(define optname-price-source (N_ "Price Source"))
(define optname-invert (N_ "Invert prices"))
(define optname-marker (N_ "Marker"))
(define optname-markercolor (N_ "Marker Color"))
(define optname-plot-width (N_ "Plot Width"))
(define optname-plot-height (N_ "Plot Height"))
@@ -85,10 +84,6 @@
(gnc:options-add-plot-size!
options gnc:pagename-display
optname-plot-width optname-plot-height "c" (cons 'percent 100.0) (cons 'percent 100.0))
(gnc:options-add-marker-choice!
options gnc:pagename-display
optname-marker "a" 'filledsquare)
(gnc-register-color-option options
gnc:pagename-display optname-markercolor
@@ -131,7 +126,6 @@
(height (get-option gnc:pagename-display optname-plot-height))
(width (get-option gnc:pagename-display optname-plot-width))
(marker (get-option gnc:pagename-display optname-marker))
(mcolor
(gnc:color-option->hex-string
(gnc:lookup-option (gnc:report-options report-obj)
@@ -161,6 +155,9 @@
(int-secs (cadr (assq-ref intervals interval)))
(data '()))
;; apply default settings from preferences
(gnc:html-chart-apply-preferences-report! chart)
;; Short helper for all the warnings below
(define (make-warning title text)
(gnc:html-document-add-object!
@@ -185,16 +182,6 @@
(gnc-date-interval-format from-date to-date))))
(gnc:html-chart-set-width! chart width)
(gnc:html-chart-set-height! chart height)
(gnc:html-chart-set! chart
'(options elements point pointStyle)
(case marker
((filleddiamond diamond) "rectRot")
((filledcircle circle) "circle")
((filledsquare square) "rect")
((cross) "crossRot")
((plus) "cross")
((dash) "line")))
(gnc:html-chart-set-y-axis-label!
chart (gnc-commodity-get-mnemonic amount-commodity))
@@ -202,6 +189,9 @@
(gnc:html-chart-set-x-axis-type! chart 'linear)
(gnc:html-chart-set-custom-x-axis-ticks?! chart #f)
;; tailor applied GC's preferences toward this particular chart
(gnc:html-chart-set! chart '(options tooltips caretPadding) (+ (gnc-prefs-get-int "general.report" "chart-point-size") 2))
(cond
((gnc-commodity-equiv report-currency price-commodity)
(make-warning
@@ -273,7 +263,7 @@ Unfortunately, the plotting tool can't handle that.")))
chart (map
(match-lambda
((x y)
(format #f "~2,2f ~a = ~a"
(format #f "~2,2F ~a = ~a"
x int-label (gnc:monetary->string
(gnc:make-gnc-monetary amount-commodity y)))))
data))
@@ -281,10 +271,9 @@ Unfortunately, the plotting tool can't handle that.")))
(gnc:html-chart-add-data-series!
chart (G_ "Price")
(map (match-lambda ((x y) (list (cons 'x x) (cons 'y y)))) data)
mcolor
'pointBorderColor mcolor 'fill #f 'borderColor "#4bb2c5"
'pointBackgroundColor
(if (memq marker '(filledcircle filledsquare filleddiamond)) mcolor "white"))
(string-append "#" mcolor)
'pointBorderColor (string-append "#" mcolor) 'fill #f 'borderColor "#4bb2c5"
'pointBackgroundColor (string-append "#" mcolor))
(gnc:html-document-add-object! document chart)))))
@@ -293,7 +282,7 @@ Unfortunately, the plotting tool can't handle that.")))
;; Here we define the actual report
(gnc:define-report
'version 1
'name (N_ "Price")
'name (N_ "Price Scatterplot")
'report-guid "1d241609fd4644caad765c95be20ff4c"
'menu-path (list gnc:menuname-asset-liability)
'menu-name (N_ "Price Scatterplot")
+7
View File
@@ -93,6 +93,13 @@
#define GNC_PREF_CURRENCY_OTHER "currency-other"
#define GNC_PREF_CURRENCY_CHOICE_LOCALE "currency-choice-locale"
#define GNC_PREF_CURRENCY_CHOICE_OTHER "currency-choice-other"
/* Chart preferences */
#define GNC_CHART_POINT_STYLE "chart-point-style"
#define GNC_CHART_POINT_SIZE "chart-point-size"
#define GNC_CHART_POINT_SIZE_HOVER "chart-point-size-hover"
#define GNC_CHART_TOOLTIP_CARET "chart-tooltip-caret-size"
#define GNC_CHART_TOOLTIP_POSITION "chart-tooltip-position"
#define GNC_CHART_TOOLTIP_ENGAGE_RADIUS "chart-tooltip-engage-radius"
#ifdef __cplusplus
extern "C" {