If your graphic somehow generates data, I would give D3.js a try.
Even if the weight of the data of your needs is low, I think it can be very useful to give him a look.
On the plus side is that it generates a completely standard svg style with standard css, so you can easily check what happens. You can even use it to generate svg, and then copy / paste your SVG into another project without D3.js.
Another plus is the support for transitions, this is very good imho.
link
source share