Hi,
I recently completed the evaluation of Infragistics controls for Jquery and MVC, and I found them highly satisfying. I had a couple of questions though.
Q1 : Can we export the charts and reports to pdf, excel and other formats?
Q2: How is the localization handled in grids and charts? Apart from Date picker controls, which other controls from infragistics jquery, offer the localization feature?
Regards,
Shahan
Hi Shahan,
Glad to hear that !
Q1: Yes, the charts content can be exported as images. It cannot be directly exported as PDF/Excel, but you can use our server-side libraries in order to embed the exported image into the document. The jQuery Chart is basically rendered on a HTML5 Canvas. You use something like this to export the canvas data to an image, send its data to the server using a POST request, then on the server, you can use our APIs in order to generate a PDF or an Excel report:
Where "canvas" is your canvas element for the chart.
$.post('/upload', { someImgID: <id>, img : canvas.toDataURL('image/jpeg'),
<extra params> }, function(data) {});
Q2: Localization for grids / charts is handled in localization files which contain key/value pairs. Basically all strings are exposed in those files instead of hardcoding them in the code. So for example, if you'd like to localize the paging feature in a different language, you can have a look at the following folder:
js\i18n\igGrid\ig.ui.grid.paging-<your language>.js
and add this new file and change the values of the keys.
Then in your page, you need to reference: <script type="text/javascript" src="./js/ig.ui.grid.paging.js"></script> <script type="text/javascript" src="./js/i18n/igGrid/ig.ui.grid.paging-en.js"></script>
Something like this, but basically that's the idea.
Hope it helps. Please let me know if you have any other questions.
Thank you,
Angel
Thank you very much Angel.
The server side libraries, for export of charts to images and then to PDF and Excel format, are included in the JQuery and ASP.Net MVC controls, OR do I need to buy any other license for that?
you are welcome.
They are included, you don't need to buy separate licenses. There are some examples which use those libraries here:
https://ko.infragistics.com/resources/sample-applications/wpf-igexcel
https://ko.infragistics.com/resources/sample-applications/wpf-igword
Hope it helps. Thanks,