I am appending an svg to my div and applying a viewBox attribute of '0 0 100% 100%'. My console is stating an error from d3.js.
Error: Invalid value for <svg> attribute viewBox="0 0 100% 100%"
Here is snippet from the code
d3.select("#chart")
.append("svg")
.attr("viewBox", "0 0 100% 100%");
Is using percentages in a viewBox attribute allowed?
a valid viewBox must consist of 4 numbers separated by whitespace and/or comma. Percentages are not allowed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With