fix: destroy charts when switching tabs

This commit is contained in:
Jordan Wages 2025-07-19 17:03:48 -05:00
commit 297c913f2a
7 changed files with 22 additions and 18 deletions

View file

@ -180,6 +180,10 @@
});
}
function destroyAllCharts() {
Object.values(containers).forEach(destroyCharts);
}
function loadReports() {
let path;
let container;
@ -296,6 +300,7 @@
}
function switchTab(name) {
destroyAllCharts();
currentTab = name;
tabs.forEach(tab => {
tab.classList.toggle('is-active', tab.dataset.tab === name);