Reputation: 239
I am trying to find out Export feature for Bar charts to JPEG/PNG... I didn't find this any where in Prime-faces demo section. Please let me know if this feature is available in prime faces charts or not.
Also, Please let me know if we have any animation features like fade in/fade out etc... Please share the examples or URLs on this, if any.
Any thing on this will be much appreciable!!
Upvotes: 3
Views: 3605
Reputation: 37061
Primefaces chart components is based on jqPlot charting library , and although this library does not have the export feature , it is possible to achieve it with the help of jquery... (I haven't tried it myself) You can google a bit for export jqplot to png in google and you will see several articles / forum threads about the export of jqplot
here are several
Export jqplot to PNG <-- got several links inside
So basically you need to add commandButton that will call some js code that will generate the image...
I think that it is possible, but don't know how easy it is...
Regarding the animation , again , the jqplot does have some animation look here I don't know if primefaces got it...
But its not so hard at all to use the original jqPlot charting library with primefaces...
UPDATE
Just noticed that the jqPlot does have the export to image option... look here so you can ask the primefaces team to upgrade their jqPlot version... or use directly the jqPlot library in your project
Upvotes: 1
Reputation: 30025
The Primefaces chart components don't come with a built-in export feature. There is a JFreeChart integration example that produces charts in png format that can be download with a right-click.
From theory fade-in/fade-out features could be implemented with javascript/jquery.
Upvotes: 0