mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 09:22:33 +00:00
Make sure charts are destroyed.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -30,10 +30,10 @@
|
|||||||
"integrity": "sha384-B73JAwYNSgI4rwb14zwxigHgAkg1Ms+j6+9sJoDpiL11+VW5RjQCLfIh0RVoi0h6"
|
"integrity": "sha384-B73JAwYNSgI4rwb14zwxigHgAkg1Ms+j6+9sJoDpiL11+VW5RjQCLfIh0RVoi0h6"
|
||||||
},
|
},
|
||||||
"resources/assets/v2/pages/dashboard/dashboard.js": {
|
"resources/assets/v2/pages/dashboard/dashboard.js": {
|
||||||
"file": "assets/dashboard-30735080.js",
|
"file": "assets/dashboard-9c9be7cf.js",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"src": "resources/assets/v2/pages/dashboard/dashboard.js",
|
"src": "resources/assets/v2/pages/dashboard/dashboard.js",
|
||||||
"integrity": "sha384-dOS/aqo8HSBC1WH7zzmysvvdJdCMYW/RYDXYcq6d33huiXJe2VHhIreFTW/4Lh0R"
|
"integrity": "sha384-fpX8mrTJxfFxKxTS5d9M+3SJnQE9ePo1Re15lATVi+Q165igCJ6/Rs/mXyezYI4G"
|
||||||
},
|
},
|
||||||
"resources/assets/v2/sass/app.scss": {
|
"resources/assets/v2/sass/app.scss": {
|
||||||
"file": "assets/app-28a195fd.css",
|
"file": "assets/app-28a195fd.css",
|
||||||
|
@@ -70,6 +70,9 @@ export default () => ({
|
|||||||
for (const i in data) {
|
for (const i in data) {
|
||||||
if (data.hasOwnProperty(i)) {
|
if (data.hasOwnProperty(i)) {
|
||||||
const current = data[i];
|
const current = data[i];
|
||||||
|
if (!current.hasOwnProperty('key')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
let key = current.key;
|
let key = current.key;
|
||||||
// native (auto conversion):
|
// native (auto conversion):
|
||||||
if (this.autoConversion) {
|
if (this.autoConversion) {
|
||||||
|
@@ -164,7 +164,7 @@ export default () => ({
|
|||||||
y: {
|
y: {
|
||||||
ticks: {
|
ticks: {
|
||||||
callback: function (context) {
|
callback: function (context) {
|
||||||
return formatMoney(context, currencies[0]);
|
return formatMoney(context, currencies[0] ?? 'EUR');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -25,6 +25,7 @@ import {Flow, SankeyController} from 'chartjs-chart-sankey';
|
|||||||
import {loadTranslations} from "../../support/load-translations.js";
|
import {loadTranslations} from "../../support/load-translations.js";
|
||||||
import {I18n} from "i18n-js";
|
import {I18n} from "i18n-js";
|
||||||
import {getCacheKey} from "../../support/get-cache-key.js";
|
import {getCacheKey} from "../../support/get-cache-key.js";
|
||||||
|
import {format} from "date-fns";
|
||||||
|
|
||||||
Chart.register({SankeyController, Flow});
|
Chart.register({SankeyController, Flow});
|
||||||
|
|
||||||
|
@@ -197,6 +197,9 @@ export default () => ({
|
|||||||
console.error('cannot handle yet');
|
console.error('cannot handle yet');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// reset subscription data
|
||||||
|
subscriptionData = {};
|
||||||
|
this.subscriptions = [];
|
||||||
console.log('cache is invalid, must download');
|
console.log('cache is invalid, must download');
|
||||||
let params = {
|
let params = {
|
||||||
start: format(start, 'y-MM-dd'),
|
start: format(start, 'y-MM-dd'),
|
||||||
@@ -263,6 +266,10 @@ export default () => ({
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
var graph = Chart.getChart(document.querySelector(id));
|
||||||
|
if (typeof graph !== 'undefined') {
|
||||||
|
graph.destroy();
|
||||||
|
}
|
||||||
new Chart(document.querySelector(id), config);
|
new Chart(document.querySelector(id), config);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user