What Is Viewbox In Svg. Its value is a list of four numbers separated by whitespace or commas. The width is the width in user coordinatespx units within the SVG code that should be scaled to fill the width of the area into which youre drawing your SVG the view port in SVG lingo.
Control the viewBox by adding the attribute viewBox to the svg element. Min-x min-y width and height. The numbers separated by whitespace andor a comma which specify a rectangle in user space which is mapped to the bounds of the viewport established for the associated SVG element not the browser viewport.
Your viewbox says that your ruler will have 1500 units to match the 200 pixel size width of the svg.
Control the viewBox by adding the attribute viewBox to the svg element. The thing thats being moved is your viewBox as a mask if you will on top of your SVG viewport. The viewBox is similar to the viewport but you can also use it to pan and zoom like a telescope. It can also be used on the elements symbol marker pattern and view.