Creating a Download-PDF link for an embedded dashboard

Embedding

If you and your team have embedded a Chartio dashboard somewhere and you want its viewers to be able to download a PDF of that dashboard, you can do this by creating an HTML link.

First, start with the basic structure for the <a> tag:

<a href='https://chartio.com/api/organizations/{ORGANIZATION_ID}/dashboards/{DASHBOARD_ID}/export/pdf?{FILTERS}'>Download PDF</a>

To customize the <a> tag for the embedded dashboard, just replace the following with the appropriate values for your dashboard:

  • {ORGANIZATION_ID}: This is the unique numeric ID associated with your organization
    Don’t know your organization ID? Send us a quick email at accounts@chartio.com and we’ll help you with that.
  • {DASHBOARD_ID}: This is the unique numeric ID associated with the embedded dashboard.
    Don’t know the dashboard ID? Open up the dashboard in Chartio and hover over the dashboard title in the top left corner. A tooltip will appear with the title and dashboard ID, separated by a hyphen.
  • {FILTERS}: If you have any Dashboard Controls connected to your dashboard, you can manually set them in the link as key-value pairs, where the key is the name you gave to your dashboard control and the value is what you wish to set the control to; separate each filter with an ampersand &
  • Download PDF: This is the clickable text shown for the link. You could change this to anything you want, but “Download PDF” is probably the clearest choice for what you’re trying to do here.

Here’s an example!

<a href='https://chartio.com/api/organizations/12345/dashboards/678902/export/pdf?CALENDAR_INTERVAL=2019-05-21&CALENDAR_INTERVAL=2019-11-21&TEXT_INPUT=1000'>Download PDF</a>

  • Organization ID is 12345.
  • Dashboard ID is 678902.
  • For this example, the user has two Dashboard Controls: Calendar and Text Input. Because the Calendar control requires a start and end date, there are three filter parameters:
    • CALENDAR_INTERVAL (start): 2019-05-21
    • CALENDAR_INTERVAL (end): 2019-11-21
    • TEXT_INPUT: 1000

Related Embedding Help Articles

See more