Saving Morris Charts To Image Using Html2canvas
I have a div in which i have morris and Flot charts I am saving the div in Image using html2canvas which saves only Flot charts and the morris charts space is left blank in the ima
Solution 1:
Flot charts are drawn using canvas, hence can be converted to image using html2canvas. Morris charts are drawn using SVG and not canvas.One of the ways by which you can export Morris charts, is first convert SVG to canvas using one of the below,
https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Drawing_DOM_objects_into_a_canvas
And then export the converted canvas to image using html2canvas.
Post a Comment for "Saving Morris Charts To Image Using Html2canvas"