export-to-image

SVG to Image export performance issues (using canvg / XMLSerializer / getComputedStyle)

 ̄綄美尐妖づ 提交于 2019-12-11 18:26:13
问题 I am using canvg to convert a chart svg to an image. We have the issue that by default not all CSS attributes are applied to the image so we ended up using getComputedStyle in a loop. This is a total mess under performance aspects if we have 10 or even 20 charts to be exported at once. var labels = ['2018-10-01', '2018-10-02', '2018-10-03', '2018-10-04', '2018-10-05', '2018-10-06', '2018-10-07', '2018-10-08', '2018-10-09', '2018-10-10', '2018-10-11', '2018-10-12', '2018-10-13', '2018-10-14',