mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 03:53:37 +00:00
Extend JS to include currency code #37
This commit is contained in:
@@ -14,7 +14,7 @@ function googleLineChart(URL, container, options) {
|
||||
var money = new google.visualization.NumberFormat({
|
||||
decimalSymbol: ',',
|
||||
groupingSymbol: '.',
|
||||
prefix: '\u20AC '
|
||||
prefix: currencyCode + ' '
|
||||
});
|
||||
for (i = 1; i < gdata.getNumberOfColumns(); i++) {
|
||||
money.format(gdata, i);
|
||||
@@ -52,7 +52,7 @@ function googleBarChart(URL, container, options) {
|
||||
var money = new google.visualization.NumberFormat({
|
||||
decimalSymbol: ',',
|
||||
groupingSymbol: '.',
|
||||
prefix: '\u20AC '
|
||||
prefix: currencyCode + ' '
|
||||
});
|
||||
for (i = 1; i < gdata.getNumberOfColumns(); i++) {
|
||||
money.format(gdata, i);
|
||||
@@ -90,7 +90,7 @@ function googleColumnChart(URL, container, options) {
|
||||
var money = new google.visualization.NumberFormat({
|
||||
decimalSymbol: ',',
|
||||
groupingSymbol: '.',
|
||||
prefix: '\u20AC '
|
||||
prefix: currencyCode + ' '
|
||||
});
|
||||
for (i = 1; i < gdata.getNumberOfColumns(); i++) {
|
||||
money.format(gdata, i);
|
||||
@@ -113,43 +113,6 @@ function googleColumnChart(URL, container, options) {
|
||||
}
|
||||
}
|
||||
|
||||
function googleStackedColumnChart(URL, container, options) {
|
||||
if ($('#' + container).length == 1) {
|
||||
$.getJSON(URL).success(function (data) {
|
||||
/*
|
||||
Get the data from the JSON
|
||||
*/
|
||||
gdata = new google.visualization.DataTable(data);
|
||||
|
||||
/*
|
||||
Format as money
|
||||
*/
|
||||
var money = new google.visualization.NumberFormat({
|
||||
decimalSymbol: ',',
|
||||
groupingSymbol: '.',
|
||||
prefix: '\u20AC '
|
||||
});
|
||||
for (i = 1; i < gdata.getNumberOfColumns(); i++) {
|
||||
money.format(gdata, i);
|
||||
}
|
||||
|
||||
/*
|
||||
Create a new google charts object.
|
||||
*/
|
||||
var chart = new google.visualization.ColumnChart(document.getElementById(container));
|
||||
/*
|
||||
Draw it:
|
||||
*/
|
||||
chart.draw(gdata, options || defaultStackedColumnChartOptions);
|
||||
|
||||
}).fail(function () {
|
||||
$('#' + container).addClass('google-chart-error');
|
||||
});
|
||||
} else {
|
||||
console.log('No container found called "' + container + '"');
|
||||
}
|
||||
}
|
||||
|
||||
function googleComboChart(URL, container, options) {
|
||||
if ($('#' + container).length == 1) {
|
||||
$.getJSON(URL).success(function (data) {
|
||||
@@ -164,7 +127,7 @@ function googleComboChart(URL, container, options) {
|
||||
var money = new google.visualization.NumberFormat({
|
||||
decimalSymbol: ',',
|
||||
groupingSymbol: '.',
|
||||
prefix: '\u20AC '
|
||||
prefix: currencyCode + ' '
|
||||
});
|
||||
for (i = 1; i < gdata.getNumberOfColumns(); i++) {
|
||||
money.format(gdata, i);
|
||||
@@ -201,7 +164,7 @@ function googlePieChart(URL, container, options) {
|
||||
var money = new google.visualization.NumberFormat({
|
||||
decimalSymbol: ',',
|
||||
groupingSymbol: '.',
|
||||
prefix: '\u20AC '
|
||||
prefix: currencyCode + ' '
|
||||
});
|
||||
for (i = 1; i < gdata.getNumberOfColumns(); i++) {
|
||||
money.format(gdata, i);
|
||||
|
Reference in New Issue
Block a user