JamesZ

FusionChart javascript to PNG Java only solution

Recommended Posts

Hi,

I'd like to convert a Chart created with FusionChart JavaScript (latest version) to a png image on my Java tomcat server without having to use php or C#.

My scenario :
1. A FusionChart JavaScript chart is created on the browser
2. I will add a button called  "save on server"
3. User clicks on the button and then the image is saved on the server as a png image.

So basically, the part that I need is step 3. I need a java only server based solution. I'm currently using tomcat 7 and java 7 to run the webapp.

Is there a tutorial for us Java programmers? I see alot of c# and php solution, but not many for Java.
Any help would be appreciated.

Thanks

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

As per your requirement, you can initiate the export process by clicking an HTML using the FusionCharts JavaScript API function "exportChart()".

 

Now coming to exporting of pure JavaScript charts image to server using Java, currently we do not have any implementation of the same in Java.

 

However, as a work around you can use "wkhtmltoimage", a simple shell utility to convert HTML to images and export the chart along with the entire page content, to server.

 

For more details on this, please visit the link: http://blog.fusioncharts.com/2013/03/how-to-save-charts-as-images-at-server-side/

 

Hope it helps!

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