Option to save chart as pdf or image when using GetOrgChart - Javascript Chart.js

Javascript examples for Chart.js:Chart Configuration

Description

Option to save chart as pdf or image when using GetOrgChart

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>GetOrgChart enablePrint option</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="http://www.getorgchart.com/GetOrgChart/getorgchart/getorgchart.js"></script> 
      <link rel="stylesheet" type="text/css" href="http://www.getorgchart.com/GetOrgChart/getorgchart/getorgchart.css"> 
      <style id="compiled-css" type="text/css">

html, body {margin: 0px; padding: 0px;height: 100%; overflow: hidden; }
#people {width: 100%;height: 100%; }


      </style> 
      <script type="text/javascript">
    window.onload=function(){/* w  w  w.  j av a  2  s . c o  m*/
        var orgchart = new getOrgChart(document.getElementById("people"),{
            enablePrint: true,
            dataSource: [
           { id: 1, parentId: null, Name: "Amber McKenzie"},
           { id: 2, parentId: 1, Name: "Ava Field"},
           { id: 3, parentId: 1, Name: "Evie Johnson"}]
        });
    }

      </script> 
   </head> 
   <body> 
      <div id="people"></div>  
   </body>
</html>

Related Tutorials