Saving Morris charts to image using HTML2CANVAS

Abhishek D

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 image. Javascript code -

$('#DIV1').html2canvas({
             onrendered: function (canvas) {
                 $('#img_val').val(canvas.toDataURL("image/png"));                    
             }
         });    

Please suggest how can i save the morris charts in the same image.. Thanks in advance

ASN

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

http://fabricjs.com/

And then export the converted canvas to image using html2canvas.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Saving Morris charts to image using HTML2CANVAS

From Dev

Saving canvas with background image to server with html2canvas

From Dev

Saving a image with 2 charts in R

From Dev

convert html with highcharts graph to image using html2canvas

From Dev

Is combination charts (area and bar charts) together possible using Morris?

From Dev

How to download current screen as PDF and Image using html2canvas JS?

From Dev

How to download current screen as PDF and Image using html2canvas JS?

From Dev

Javascript TypeError with Morris charts

From Dev

Morris charts & PHP issues

From Dev

html2canvas not capturing image

From Dev

html2canvas crop image on click

From Dev

html2canvas not taking capture of image

From Dev

html2canvas capturing div image

From Dev

html2canvas crop image on click

From Dev

Using gif image and saving

From Dev

why google maps and charts are not supported by html2canvas in javascript?

From Dev

Specifying file name for saving html2canvas to local

From Dev

Textarea screenshot using Html2Canvas

From Dev

Print page using html2canvas

From Dev

Saving image to localstorage - canvas

From Dev

HTML Div convert into image with background image Html2canvas

From Dev

HTML2Canvas - get created canvas image URI

From Dev

Saving image with UIImageJPEGRepresentation and using as UIImage

From Dev

IMage elaboration and saving using Multithreading

From Dev

How to save html2canvas image into System Folder in jquery

From Dev

Codemirror & html2canvas: Save iFrame as Image

From Dev

html2canvas doesn't get image full height

From Dev

html2canvas generated image not picking svg in chart

From Dev

Scale image before toDataURL - html2canvas

Related Related

HotTag

Archive