Let’s start with
SVG specification is developed by W3C and here’s the most basic explanation of it
Graphics Most existing XML grammars represent either textual information, or represent raw data such as financial information. They typically provide only rudimentary graphical capabilities, often less capable than the HTML ‘img’ element. SVG fills a gap in the market by providing a rich, structured description of vector and mixed vector/raster graphics; it can be used stand-alone, or as an XML namespace with other grammars.
SVG provides basics shapes like rect,circle,ellipse,line,polyline,polygon
- A browser and a web server (for Mac/Linux users: there is one build in your machine, just start python -m SimpleHTTPServer 8888 in Terminal Window and the current path becomes ‘server’) . For windows user Apache Tomact or nginx [engine x] would also work
- Download d3.js (comes with samples, some of them will NOT run when you open the html files as file, so use the web server instead!)
- Text editor
var vizSVG = d3.select(“#
Here's the output
D3 employs a declarative approach, operating on arbitrary sets of nodes called selections. So every DOM element is essentially a selector as show above.
<circle cx=”100″ cy=”50″ r=”40″ stroke=”black”