mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-08 15:05:29 +00:00
Expand view
This commit is contained in:
@@ -27,4 +27,10 @@ export default class Dashboard {
|
||||
let endStr = format(end, 'y-MM-dd');
|
||||
return api.get('/api/v2/chart/account/dashboard', {params: {start: startStr, end: endStr}});
|
||||
}
|
||||
|
||||
expense(start, end) {
|
||||
let startStr = format(start, 'y-MM-dd');
|
||||
let endStr = format(end, 'y-MM-dd');
|
||||
return api.get('/api/v2/chart/account/expense-dashboard', {params: {start: startStr, end: endStr}});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,12 +209,14 @@ export default () => ({
|
||||
init() {
|
||||
Promise.all([getVariable('viewRange', '1M'), getVariable('autoConversion', false),]).then((values) => {
|
||||
this.autoConversion = values[1];
|
||||
// console.log(values[1]);
|
||||
// main dashboard chart:
|
||||
this.loadChart();
|
||||
this.loadAccounts();
|
||||
});
|
||||
window.store.observe('end', () => {
|
||||
this.chartData = null;
|
||||
this.expenseAccountChart = null;
|
||||
// main dashboard chart:
|
||||
this.loadChart();
|
||||
this.loadAccounts();
|
||||
});
|
||||
|
||||
@@ -55,7 +55,23 @@ export default () => ({
|
||||
xaxis: {
|
||||
categories: [],
|
||||
},
|
||||
yaxis: {},
|
||||
yaxis: {
|
||||
labels: {
|
||||
formatter: function (value, index) {
|
||||
if (undefined === value) {
|
||||
return value;
|
||||
}
|
||||
if (undefined === index) {
|
||||
return value;
|
||||
}
|
||||
if (typeof index === 'object') {
|
||||
index = index.dataPointIndex; // this is the "category name + currency" index
|
||||
}
|
||||
let currencyCode = window.budgetCurrencies[index] ?? 'EUR';
|
||||
return formatMoney(value, currencyCode);
|
||||
}
|
||||
}
|
||||
},
|
||||
fill: {
|
||||
opacity: 1
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user