mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 10:33:30 +00:00
46 lines
1.2 KiB
JavaScript
46 lines
1.2 KiB
JavaScript
![]() |
var defaultChartOptions = {
|
||
|
scales: {
|
||
|
xAxes: [
|
||
|
{
|
||
|
gridLines: {
|
||
|
display: false
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
yAxes: [{
|
||
|
display: true,
|
||
|
ticks: {
|
||
|
callback: function (tickValue, index, ticks) {
|
||
|
"use strict";
|
||
|
return accounting.formatMoney(tickValue);
|
||
|
|
||
|
},
|
||
|
beginAtZero: true
|
||
|
}
|
||
|
|
||
|
}]
|
||
|
},
|
||
|
tooltips: {
|
||
|
mode: 'label',
|
||
|
callbacks: {
|
||
|
label: function (tooltipItem, data) {
|
||
|
"use strict";
|
||
|
return data.datasets[tooltipItem.datasetIndex].label + ': ' + accounting.formatMoney(tooltipItem.yLabel);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
|
||
|
var defaultPieOptions = {
|
||
|
tooltips: {
|
||
|
callbacks: {
|
||
|
label: function (tooltipItem, data) {
|
||
|
"use strict";
|
||
|
var value = data.datasets[0].data[tooltipItem.index];
|
||
|
return data.labels[tooltipItem.index] + ': ' + accounting.formatMoney(value);
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
maintainAspectRatio: true,
|
||
|
responsive: true
|
||
|
};
|