fix: destroy charts when switching tabs
This commit is contained in:
parent
bf09af6b5e
commit
297c913f2a
7 changed files with 22 additions and 18 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue