jQuery Chart Exporting
Shield UI Chart supports out-of-the-box exporting to image and printing. These options are enabled by default, so there is no need to include any additional settings.
Further manipulation of these settings is done via the exportOptions section of the declaration of the control.
While exporting to PDF is not supported out-of-the-box, it can be achieved through custom code.
In order to achieve this, you need to send the image data to your server, where it can be exported to PDF. The following example demonstrates one such approach.
The steps to follow are listed below:
2. Call chart.exportToImage() to render the chart as image.
3. Wait 100ms for the image box to show and find the image source: $(".shield- lightbox").find("img").attr("src"). The image src is a base64-encoded string that contains the image data.
4. Send the image data to the server for exporting. In this particular example, we send it to http://pdfcrowd.com/ for demonstration. The result is a JSON string with a URL that can be used to access the generated PDF.
Your server and PDF generation approach may be different, but the idea is to send the image data somehow so it can be converted to PDF.