I have an SVG graphic drawn dynamically from data. It looks like this:
I am using Canvg to create a (hidden) canvas element and allow the user to save SVG as image or pdf. The Canvas looks like this:
The styling is wrong (!) and some paths appear to be missing too. I have tried using CSS to change the styling. This has worked for background colour and font-family but not for anything else:
canvas#canvas {
background-color: aliceblue;//works
font-family: sans-serif;//works
font-size: 10px;//works
fill: gray;//doesn't work
}
Does anyone know how to style paths and font color in the creation of a canvas element using canvg?