Account chart can display multiple currencies.

This commit is contained in:
James Cole
2017-04-15 17:26:03 +02:00
parent c7984d4363
commit 209a907c61
4 changed files with 15 additions and 5 deletions

View File

@@ -42,7 +42,8 @@ var defaultChartOptions = {
callbacks: {
label: function (tooltipItem, data) {
"use strict";
return data.datasets[tooltipItem.datasetIndex].label + ': ' + accounting.formatMoney(tooltipItem.yLabel);
return data.datasets[tooltipItem.datasetIndex].label + ': ' +
accounting.formatMoney(tooltipItem.yLabel, data.datasets[tooltipItem.datasetIndex].currency_symbol);
}
}
}

View File

@@ -91,7 +91,7 @@ function doubleYChart(URI, container) {
"use strict";
var colorData = true;
var options = defaultChartOptions;
var options = $.extend(true, {}, defaultChartOptions);
options.scales.yAxes = [
// y axis 0:
{
@@ -141,7 +141,7 @@ function doubleYNonStackedChart(URI, container) {
"use strict";
var colorData = true;
var options = defaultChartOptions;
var options = $.extend(true, {}, defaultChartOptions);
options.scales.yAxes = [
// y axis 0:
{