Documentation Embedding FAQs

Get the height of an embedded dashboard

If you would like to set the height of your frame to match the content provided by Chartio’s dashboard you can use the following code to do so:

    <title>Chartio Embedding Iframe Height Example</title>
    <script type="text/javascript">
      window.onload = () => {
        const iframe = document.querySelector('#chartio-embed-iframe');
        window.addEventListener('message', (message) => {
          if (message.origin !== '') return;
          if ( && {
            iframe.height = + 'px';
    <iframe id="chartio-embed-iframe" width="100%" src="Embed URL from Dashboard Settings">

Update the iframe src attribute with the Example Usage URL value from the dashboard’s Embedding settings and save the HTML below in file with a .html extension. Then, open the file in a browser.

For additional information about the Embedding feature including step-by-step instructions, see our Embedding documentation.