mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Redo the highlighter in barcharts.
The formatting code was removed with the introduction of the zoom cursor. It continued to display poorly formatted information though which is now fixed again
This commit is contained in:
parent
6d0a3707e1
commit
00b827dbf2
@ -456,8 +456,12 @@
|
|||||||
autoscale: true,
|
autoscale: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
highlighter: {
|
||||||
|
tooltipContentEditor: formatTooltip,
|
||||||
|
},
|
||||||
cursor:{
|
cursor:{
|
||||||
show: true,
|
show: true,
|
||||||
|
showTooltip: false,
|
||||||
zoom: true
|
zoom: true
|
||||||
}
|
}
|
||||||
};\n")
|
};\n")
|
||||||
@ -495,12 +499,9 @@
|
|||||||
(push "var plot = $.jqplot('")(push chart-id)(push"', data, options);
|
(push "var plot = $.jqplot('")(push chart-id)(push"', data, options);
|
||||||
|
|
||||||
function formatTooltip(str, seriesIndex, pointIndex) {
|
function formatTooltip(str, seriesIndex, pointIndex) {
|
||||||
if (options.axes.xaxis.ticks[pointIndex] !== undefined)
|
x = data[seriesIndex][pointIndex][0];
|
||||||
x = options.axes.xaxis.ticks[pointIndex];
|
|
||||||
else
|
|
||||||
x = pointIndex;
|
|
||||||
y = data[seriesIndex][pointIndex][1].toFixed(2);
|
y = data[seriesIndex][pointIndex][1].toFixed(2);
|
||||||
return options.series[seriesIndex].label + ' ' + x + '<br><b>' + y + '</b>';
|
return options.series[seriesIndex].label + '<br/>' + x + '<br/><b>' + y + '</b>';
|
||||||
}\n")
|
}\n")
|
||||||
|
|
||||||
(push "});\n</script>")
|
(push "});\n</script>")
|
||||||
|
Loading…
Reference in New Issue
Block a user