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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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/