title: Import data from CSV file
body: <p>I am trying to import *.csv using the init-from-csv.html (from the demo files). I downloaded the GetOrgChart zip files and I changed the link to the actual .js and .css files.</p>
  
  <p>This my code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt;
      &lt;title&gt;OrgChart | Initialize From XML&lt;/title&gt;
  
      &lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"&gt;
      &lt;script src="D:/Tools/GetOrgChart/getorgchart/getorgchart.js"&gt;&lt;/script&gt;
      &lt;link href="D:/Tools/GetOrgChart/getorgchart/getorgchart.css" rel="stylesheet" /&gt;
      &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"&gt;&lt;/script&gt;
  
  
  
      &lt;style type="text/css"&gt;
          html, body {
              margin: 0px;
              padding: 0px;
              width: 100%;
              height: 100%;
              overflow: hidden;
          }
  
          #people {
              width: 100%;
              height: 100%;
          }
      &lt;/style&gt; &lt;/head&gt; &lt;body&gt;
      &lt;div id="people"&gt;&lt;/div&gt;
      &lt;script type="text/javascript"&gt;
  
          function convertToCsvJson(allText) {
              var allTextLines = allText.split(/\r\n|\n/);
              var headers = allTextLines[0].split(',');
              var lines = [];
  
              for (var i = 1; i &lt; allTextLines.length; i++) {
                  var data = allTextLines[i].split(',');
                  if (data.length == headers.length) {
  
                      var tarr = {};
                      for (var j = 0; j &lt; headers.length; j++) {
                          tarr[headers[j]] = data[j];
                      }
                      lines.push(tarr);
                  }
              }
  
              return lines;
          }
  
          $.get("D:/Tools/GetOrgChart/ORG_Data.txt", function (source) {
  
              source = convertToCsvJson(source);
  
              var peopleElement = document.getElementById("people");
              var orgChart = new getOrgChart(peopleElement, {
                  theme: "helen",
                  primaryFields: ["name", "Job Title"],
                  photoFields: ["Photo"],
                  linkType: "M",
                  enableEdit: false,
                  enableDetailsView: false,
                  dataSource: source
              });
          });
      &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;
  </code></pre>
  
  <p>After I open the HTML file, it will not load. I am not sure what I did wrong.</p>