I have a php MVC application that needs to create and display and org chart. Here is my View currently:
<br><br><br><br> <?php echo $string2; ?> <br><br><br><br> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load('current', {packages:["orgchart"]}); google.charts.setOnLoadCallback(drawChart); function drawChart() { // For each orgchart box, provide the name, manager, and tooltip to show. var data = new google.visualization.arrayToDateTable($string2); // Create the chart. var chart = new google.visualization.OrgChart(document.getElementById('chart_div')); // Draw the chart, setting the allowHtml option to true for the tooltips. chart.draw(data, {allowHtml:true}); } </script> $string2 contains the following data: "employee","manager","employee_title" "sdfsdfsf","sdfsfdf","developer" "Jack Goestl","manager1","management" "sd1","Joe Jones","tester" "Jack ","manager1","first level management" "Dave Bigger", "Joe Blow","developer" "Mark Jacobs","Tom Sellick","sales" "[email protected]","Ben's best","cafeteria" "manager1","Big Boss","owner" I am trying to figure out how to populate the data. As you can see $string2 is in CSV format. I have control of the format. Is there some easy way to do this? I see that there is a dataTableToCsv() but I need to go in the opposite direction. How is the best way to handle this? -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/876f692b-aaad-4b63-ae2f-d5cca392889f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
