rohit111111

Multiple chart export in one file using pure Javascript

Recommended Posts

Hi,

 

As there is batch export functionality for exporting all charts into one in flash, Is there any approach to do this in pure javascript charts?

Edited by rohit111111

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi Rohit,

 

Welcome to FusionCharts Forum.

 

Please note that FusionCharts Suite XT does not provide functionality of exporting multiple charts into single image/PDF file (Batch export) for pure JavaScript mode of rendering charts.

 

However, if you require, you could implement "wkhtmltopdf/wkhtmltoimage" shell utility or "PhantomJS" JavaScript library in your application, which is capable of generating the image/PDF of the entire webpage (containing multiple charts) in to a single file.

 

For more information on implementation of above suggestion, please visit the blog post link: http://blog.fusioncharts.com/2013/03/how-to-save-charts-as-images-at-server-side/

 

Hope this helps!

Share this post


Link to post
Share on other sites

Thanks, but is there any solution other than this? As in the case you mentioned we have to install some kind of exe or, have to execute shell. And we want only to export chart in the page not the whole html.

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

If you are interested to export the charts image at client's browser only (without hitting the server), you could export multiple charts image by using "canvg" JavaScript library.

 

For more details of "canvg" implementation, please visit our blog post link: http://blog.fusioncharts.com/2013/06/export-chart-as-image-on-client-side/

 

Hope this helps!

Share this post


Link to post
Share on other sites

Hi Sashi,

 

Thanks for letting me know about this javascript library, this library does convert SVG to canvas but not converting as same as SVG. You can see in attached images, I converted one of fusion javascript chart into canvas using canvas javascript library but the resulted canvas is not the same as SVG graph. Have you any idea about this that is there something i am doing wrong or, Is this library behaviour?

post-62319-0-49051100-1386968293_thumb.png

post-62319-0-52771900-1386968318_thumb.png

Edited by rohit111111

Share this post


Link to post
Share on other sites

Hi Rohit,

 

Could you please try setting "animation" and "defaultAnimation" attributes to 0?

 

Ref. <chart .. animation='0' defaultAnimation='0' >

 

Awaiting feedback.

Share this post


Link to post
Share on other sites

I have set the same in the fusion chart xml, but canvas for the same is not loading correctly i.e. bars are not there.

 

You can also try yourself by putting SVG of your Bar Fusion Chart in this link http://canvg.googlecode.com/svn/trunk/examples/index.htm (got by your defined reference).

 

Thanks,

Rohit

Edited by rohit111111

Share this post


Link to post
Share on other sites

Hi Rohit,

 

Apologies for delay.

 

Yes, we could see this problem replicating with Column and Bar charts.

 

However, canvg is not our native implementation so we are not completely aware of its limitations.Nevertheless, we would check with our engineering team if there is any workaround to your requirement. But since our engineering  team is working on various other high priority projects,this might take some time.

 

Hope this helps.

Share this post


Link to post
Share on other sites

Hi,

 

Is there any solution for this, what we have discussed above?

 

As, our requirement is to export multiple charts in one file even if user is in ipad or mobile or any other device which doesnot support flash and also we want to include some text within the exported Image/Jpeg/PDF of all charts, that is in the form.

 

If you have any solution, kindly let me know.

 

 

Thanks,

Rohit

Edited by rohit111111

Share this post


Link to post
Share on other sites

Hi,

 

Is there any solution for this, what we have discussed above?

 

As, our requirement is to export multiple charts in one file even if user is in ipad or mobile or any other device which doesnot support flash and also we want to include some text within the exported Image/Jpeg/PDF of all charts, that is in the form.

 

If you have any solution, kindly let me know.

 

 

Thanks,

Rohit

 

Hi,

 

Since charts are rendering fine on browser and even on Batik export component (which is very picky with SVG syntax,) I think (from a preliminary look) its a bug with canvg. Hope you try and take up the issue with canvg team as well. In the meanwhile, I will see if I can look into it - but I don't see a scope in the coming months.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now