Ensuring that bar graphs are cleared before redrawing

This commit is contained in:
2025-05-31 01:53:14 +01:00
parent 4aeb8c37b6
commit 99c59cf977
2 changed files with 56 additions and 8 deletions

View File

@@ -37,6 +37,9 @@ const width = 600; //+svg.attr("width");
const height = 200; //+svg.attr("height");
const margin = { top: 40, right: 30, bottom: 60, left: 30 };
//First clean the svg:
svg.selectAll("*").remove();
// Draw the white background
// Draw the rounded rectangle
svg.append("rect")