0

I am using canvg to render the following svg to the canvas however it fails. I am not sure why

<svg class="circularReferenceSVG" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
            <marker xmlns="http://www.w3.org/2000/svg" id="triangle" viewBox="0 0 10 10" refX="0" refY="5" markerUnits="strokeWidth" markerWidth="4" markerHeight="4" orient="auto">
                <path d="M 0 0 L 10 5 L 0 10 z" fill="#000000"></path>
            </marker>
        </svg>

My guess is that it has to do something with xmlns. I could not find on the canvg webpage anything about it. Any help will be appreciated.

Here is the screenshot of where the canvg seems to fail Here point and angle is undefined

Gagan
  • 305
  • 1
  • 13

1 Answers1

-1

you need to wrap marker tag with defs tag.

D.Marvel
  • 21
  • 1
  • 7