google-code-export / google-ajax-examples

Automatically exported from code.google.com/p/google-ajax-examples
1 stars 1 forks source link

Cannot click root node when dynamically created (OrgChart) #141

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. https://code.google.com/apis/ajax/playground/?type=visualization#org_chart
2. In the org Chart example, Remove "Mike" entry drom data table, he is the 
root node. Removing him will force the chart to draw Mike in dynamically.
3. Org Chart will still render correctly, however Mike, which was dynamically 
created, IS NOT CLICKABLE. I need Mike's "box" to be clickable in order to get 
its value of "Mike".

What is the expected output? What do you see instead?
You see Mike, but can't click on it.

What version of the product are you using? On what operating system?
Latest

Please provide any additional information below.
This is the modified example code:

function drawVisualization() {
  // Create and populate the data table.
  var data = google.visualization.arrayToDataTable([
    ['Name',                                                                 'Manager', 'Tooltip'],
    ['Jim', 'Mike',    null],
    ['Alice',                                                                'Mike',    null],
    ['Bob',                                                                  'Jim',     'Bob Sponge'],
    ['Carol',                                                                'Bob',     null]
  ]);

  // Create and draw the visualization.
  new google.visualization.OrgChart(document.getElementById('visualization')).
      draw(data, {allowHtml: true});
}
​

Original issue reported on code.google.com by Ryan.Gar...@gmail.com on 19 Sep 2013 at 5:10

GoogleCodeExporter commented 9 years ago
Error: 

Uncaught Error: Invalid value in 0,0 

Here's another example:
function drawVisualization() {
  // Create and populate the data table.
  var data = google.visualization.arrayToDataTable([
    ['Name',                                                                 'Manager', 'Tooltip'],
    ['Mike', null, null],
    ['Tim', 'Mike',    null],
    ['Alice',                                                                'Mike',    null],
    ['Bob',                                                                  'Jim',     'Bob Sponge'],
    ['Carol',                                                                'Bob',     null]
  ]);

  // Create and draw the visualization.
  new google.visualization.OrgChart(document.getElementById('visualization')).
      draw(data, {allowHtml: true});
}

Original comment by Ryan.Gar...@gmail.com on 19 Sep 2013 at 5:13