I have SVG images generated using the D3 library and they look great. Problem is, addSVG can't use them. I verified that 'regular' SVGs work, I can do basic shapes, strokes, color fills. Is there a way to get the patterns in there?
Ideally, could I extend addSVG to handle dataURIs or perhaps build a CSS with the pattern fills?
If that doesn't work, then maybe a way to parse the SVG XML string to work?
If not either of those, is there a way to create some patterns in 'regular' SVG that I could use instead? Maybe there's an existing library that's simpler than D3? I actually don't need a lot.
edit: It's worth mentioning that Node.js is not an option, and external server resources aren't really an option either. I'm saving an internal server-based SVG to PNG converter to an absolute last fallback. Also typical client-side SVG to PNG conversions are a no-go as well, I have to support IE11 and I can't get around the security error canvas.toDataURL throws (I don't think it's possible).
edit: addSVG is pretty basic and does not support patterns and other fancy bits. I was able to use canvg and addImage as a workaround. Linked article in answer does NOT work for IE11.