Skip to content

How to scale the rendered SVG relative to parent elements dimensions ? #1426

Discussion options

You must be logged in to vote

setAttributeNS is a native SVG DOM call. It is not part of Vex (I assume you're running in a browser and not nodejs).

Here is a demo. I had the zoom value backwards - smaller zoom = larger output. Same with scale, you can play around with those.

https://jsfiddle.net/AaronDavidNewman/bsgc07pj/

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@sparkeplug
Comment options

@sparkeplug
Comment options

Comment options

You must be logged in to vote
4 replies
@sparkeplug
Comment options

@AaronDavidNewman
Comment options

@sparkeplug
Comment options

@AaronDavidNewman
Comment options

Answer selected by sparkeplug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants