this question I think is more focused on angular than the d3.js part. It is assumed that with this code I can convert a svg to an image and put it on a canvas. The problem i