D3.js vs Raphael.js

Raphael is not built on D3. Raphael will help you draw elements. D3 is more comprehensive and will help you bind data to elements. So I’d say D3 is more powerful. This forum discussion Discusses presenting a SIMILE timeline using D3, they refer to this project which implements a timeline in D3. So at first … Read more

SVG re-ordering z-index (Raphael optional)

Gimme the Code! // move element “on top of” all others within the same grouping el.parentNode.appendChild(el); // move element “underneath” all others within the same grouping el.parentNode.insertBefore(el,el.parentNode.firstChild); // move element “on top of” all others in the entire document el.ownerSVGElement.appendChild(el); // move element “underneath” all others in the entire document el.ownerSVGElement.appendChild(el,el.ownerSVGElement.firstChild); Within Raphael specifically, it’s … Read more

How to access SVG elements with Javascript

Is it possible to do it this way, as opposed to using something like Raphael or jQuery SVG? Definitely. If it is possible, what’s the technique? This annotated code snippet works: <!DOCTYPE html> <html> <head> <title>SVG Illustrator Test</title> </head> <body> <object data=”alpha.svg” type=”image/svg+xml” id=”alphasvg” width=”100%” height=”100%”></object> <script> var a = document.getElementById(“alphasvg”); // It’s important to … Read more