I'm particularly interested in exploring dataviz (preferably with D3.js), which is responsive in and of itself - not just it's container or such.
Yes... have a look at madebymike.com.au/writing/svg-has-more-potential for a great overview and this tweet from Mike for more recommendations.
Not really, to my knowledge. The two main ways I'm aware of are:
The most common way being the second for libraries that enable drawing graphics/charts.
I'm a bit confused here, because SVG is vector based and therefore responsive by default
Only draw the parts that NEED to be SVG in the SVG -- break it into the smaller subsections and then use markup and CSS to handle the rest.
Basically, don't slop it all into one SVG file and magically expect it to work. Same reasons one shouldn't use images as text, or try to create complex interactions between perfect size images and text content; it's all "not viable for web deployment" concepts.
Though IMHO, "not viable for web deployment" describes a LOT of what people are doing with SVG right now. It's cute for an icon or two, anything more is typically just telling users to go plow themselves.
ESPECIALLY if you're slopping it into the markup missing caching opportunities across pages.
K
Ha!
Ibrahim Tanyalcin
{intrst:"Scnc&Art",msc:"admin@MutaFrame",strive:"Experiment&Learn",loves:"ES5",hates:"bandwagon",lang:"Javascript",twttr:"@ibrhmTanyalcin"}
1. Using 'resize' event
There are 3 things you need to keep in mind:
In short, a function will be triggered (onresize) which in turn invokes a method in the object which in turn modifies the svg.
2. Using css media queries
This one is straight forward. You define a media query such as:
```
@media screen and (max-width: 980px) {
#mySVG {....
}
} ```
There are also some other ways, but these are the main ones that came to my mind