diff --git a/public/elotracker/chart-integration.js b/public/elotracker/chart-integration.js index e68092d..357ad75 100644 --- a/public/elotracker/chart-integration.js +++ b/public/elotracker/chart-integration.js @@ -579,6 +579,8 @@ async function update_leaderboard_elements() { document.querySelector(".leaderboard-list").outerHTML = leaderboard_list; // reapply EventListeners document.querySelectorAll("button.leaderboard-element").forEach(element => element.addEventListener("mousedown", toggle_leaderboard_chart)); + // Legende leeren (wird mit neuen Charts neu generiert) + document.querySelectorAll(".chart-legend").forEach(element => element.innerHTML = ""); // recreate charts create_charts(); })