After creating a chart using d3.js, I noticed that the chart does not resize when zooming in or out on the web browser window.
Below is the code snippet of what I have attempted so far:
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<style type="text/css">
svg {
font-family: "Helvetica Neue", Helvetica;
}
.line {
fill: none;
stroke: #000;
stroke-width: 2px;
}
</style>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
// JavaScript code for chart creation
</script>
</body>
</html>
I am currently learning d3.js and struggling with this aspect. Any guidance or assistance would be greatly appreciated.