Reputation: 397
I am using Google Visualization: Organizational Chart LINK and structure is working very well, however I cannot named 2 or more fields with the same name in 1 row? I should be able to do that? Any ideas?
Upvotes: 0
Views: 2152
Reputation: 26340
The OrgCharts require that each node have a unique ID, but you can change the formatted value of those nodes to be the same:
var data = new google.visualization.DataTable();
data.addColumn('string', 'Name');
data.addColumn('string', 'Parent');
data.addRows([
[{v: 'parent_node', f: 'Parent Node'}, null],
[{v: 'child_node_1', f: 'Child Node'}, 'parent_node'],
[{v: 'child_node_2', f: 'Child Node'}, 'parent_node']
]);
See example here: http://jsfiddle.net/asgallant/LPHtr/
Upvotes: 1