Google Visualization API - Org Chart Layout - Javascript Chart.js

Javascript examples for Chart.js:Chart Configuration

Description

Google Visualization API - Org Chart Layout

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>GetOrgChart orientation option</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script> 
      <script type="text/javascript" src="https://www.getorgchart.com/GetOrgChart/getorgchart/getorgchart.js"></script> 
      <link rel="stylesheet" type="text/css" href="https://www.getorgchart.com/GetOrgChart/getorgchart/getorgchart.css"> 
      <style id="compiled-css" type="text/css">
#people {width: 100%;height: 100%; }
      </style> 
      <script type="text/javascript">
    $(window).load(function(){//ww  w .  ja  v  a  2s  .c o  m
        var orgchart = new getOrgChart(document.getElementById("people"),{
            orientation: getOrgChart.RO_LEFT,
            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