fixing console errors

This commit is contained in:
Beverly Nguyen
2024-08-07 15:27:43 -07:00
parent 65d339fb8a
commit 4bfbd9f71f
2 changed files with 8 additions and 8 deletions

View File

@@ -25,10 +25,10 @@
// Ensure the width is set correctly
if (width === 0) {
console.error('Chart container width is 0, cannot set SVG width.');
return;
throw new Error('Chart container width is 0, cannot set SVG width.');
}
svg.attr("width", width).attr("height", height);
var x = d3.scaleLinear()