Expand view

This commit is contained in:
James Cole
2023-08-06 19:36:55 +02:00
parent 551408b801
commit 06a923db94
4 changed files with 46 additions and 21 deletions

View File

@@ -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();
});

View File

@@ -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
},