Thanks. *The following is not working.* Certainly a wrong implementation of
your advice...Any idea?
*js script:*
<script type="text/javascript">
function drawVisualization() {
// Create and populate the data table.
obj = JSON.parse(sampleData.json);
var data = google.visualization.arrayToDataTable();
// Create and draw the visualization.
var chart = new
google.visualization.OrgChart(document.getElementById('visualization'));
chart.draw(data, {allowHtml: true, allowCollapse: true});
for (var i = 1; i < data.getNumberOfRows(); i++) {
chart.collapse(i, true);
}
}
*My Json file (sampleData.json):*
[
['Name',
'Manager', 'Tooltip'],
['Mike',
null, 'The President'],
[{v: 'Jim', f: 'Jim<br/><font color="red"><i>Vice
President<i></font>'}, 'Mike', null],
['Alice',
'Mike', null],
['Bob',
'Jim', 'Bob Sponge'],
['Carol',
'Bob', null]
]
--
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 http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.