In this article, we will guide you on how to add PDF download as an option in a Chart DataPage.


  1. Create a Chart DataPage.
  2. In the Configure Chart Options screen of the DataPage wizard, select Chart Settings > Enable chart actions menu.
  3. Add a Header and Footer in the Configure Chart Options screen of the DataPage wizard.
  4. Disable the HTML Editor in the Footer section.
  5. Copy and paste the following code in the Footer section:
  6. Save the DataPage.

Note: This article uses external HTML, JavaScript, or third-party solutions to add functionality outside of Caspio standard feature set. These solutions are provided “as is” without warranty, support, or guarantee. The code within this article is provided as a sample to assist you in the customization of your web applications. You may need a basic understanding of HTML and JavaScript to implement successfully.

For assistance with further customization based on your specific application requirements, please contact our Professional Services team.

<script type = "text/javascript" >
    var timer = setInterval(function() {
        //Find if chart exists using rect element every x milliseconds
        if (document.getElementsByTagName('rect') != null) {
            //Update Chart
    }, 500);
function UpdateChart() {
    try {
    exporting: {
       menuItemDefinitions: {
            // Custom definition
           downloadPDF: {
                text: 'Download as PDF'
        buttons: {
            contextButton: {
                menuItems: ['printChart', 'separator', 'downloadPDF', 'downloadPNG',  'downloadJPEG', 'downloadSVG',]
        //Stop checking
    } catch (err) {
        //log errors