Maybe I figured it out, It seems that the OrgChart is using the formatted value of the child to make a link with the value of the parent.
I think that the child value should be used instead. Any Idea? Thanks This is the code to use in the AJAX playground http://code.google.com/apis/ajax/playground/ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> <script type="text/javascript" src="http://www.google.com/jsapi"></ script> <script type="text/javascript"> google.load('visualization', '1', {'packages': ['orgchart']}); google.setOnLoadCallback(init); // Handle the query response. function init() { var data = new google.visualization.DataTable(); data.addColumn('string', 'CHILD'); data.addColumn('string', 'PARENT'); data.addColumn('string', 'ToolTip'); data.addRows([ // PARENT1 //With Formatted values the visualization is not working well [{v:'PARENT1'},{v:'ROOT'},{v:'LABEL-parent1'}], [{v:'CHILD_1',f:'CHILD'},{v:'PARENT1'},{v:'LABEL-child1'}], [{v:'LEAF'},{v:'CHILD_1', f:'CHILD'},{v:'LABEL-leaf1'}], // PARENT2 //Without Formatted values the visualization of the tree is fine [{v:'PARENT2'},{v:'ROOT'},{v:'LABEL-parent2'}], [{v:'CHILD_2'},{v:'PARENT2'},{v:'LABEL-child2'}], [{v:'LEAF2'},{v:'CHILD_2'},{v:'LABEL-leaf2'}], // PARENT3 //With formatted values equals to values the visualization is fine [{v:'PARENT3'},{v:'ROOT'},{v:'LABEL-parent3'}], [{v:'CHILD_3',f:'CHILD_3'},{v:'PARENT3'},{v:'LABEL- child3'}], [{v:'LEAF3'},{v:'CHILD_3',f:'CHILD_3'},{v:'LABEL-leaf3'}], //PARENT4 //Seems that the OrgChart is using the formatted values of the child to make a link //with the value of the parent, in fact if we add this branch we can see that it will connect // to the CHILD of PARENT1 [{v:'PARENT4'},{v:'ROOT'},{v:'LABEL-parent4'}], [{v:'CHILD_4',f:'CHILD_4'},{v:'PARENT4'},{v:'LABEL- child4'}], [{v:'LEAF4'},{v:'CHILD_4',f:'CHILD_1'},{v:'LABEL-leaf4'}], ]); var chart = new google.visualization.OrgChart (document.getElementById('chart_div')); chart.draw(data, {allowHtml:true, size: 'small', height: 150, is3D: true, allowCollapse: true}); } </script> </head> <body> <div id="chart_div"></div> </body> </html> -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
