Answer the question
In order to leave comments, you need to log in
How to make SVG chart responsive?
Good day. It is not possible to add adaptability to the chart made according to this example bl.ocks.org/mbostock/3883245 I tried to set percentages for the pixel space, but nothing came of it.
Answer the question
In order to leave comments, you need to log in
Place the graph in a container, and set the container to:
overflow-x: scroll;
overflow-y: none;
width: 100%;
codepen.io/anon/pen/aZOZmM
We remove the width and height in the markup in the svg,
and transfer their values to the viewbox and write the percentage width in css
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question