this is my js


<select id='selectdb' size=8 onclick="db_selected();" >
<option value='TSCORPE'>TSCORPE</option>
<option value='TSCORPG'>TSCORPG</option>
<option value='TSCORPW'>TSCORPW</option>

function db_selected(){
 var sname = $("#selectdb option:selected").html();
 var thiscall =cmdbservices +'110&par='+sname;
 var jsonData = $.ajax({
  url: thiscall,
  data: {tag:'db_user_by_instance'},
  dataType: "json",
  async: false
 }).responseText;
 //alert(jsonData);
 
 google.charts.load('current', {packages:['wordtree']});
 google.charts.setOnLoadCallback(drawChart2);
 $("#chart_div").show();
 
 function drawChart2() {
  var res = jsonData.split(',');
  var data = new google.visualization.DataTable();
  data.addColumn('string','[Phrase]');
  res.forEach(function(phrase) {
   data.addRow([phrase]);
  });
  
  var options = {
   wordtree: {
    format: 'implicit',
    word: sname  
   }
  };
  
  var chart = new 
google.visualization.WordTree(document.getElementById('chart_div'));
  chart.draw(data, options);
      }

}

Note, ajax data returned ok and assembled into datatable format also ok. no 
change to the html template nor css.

here's the problem. on first load or after page complete refresh. I got the 
display ok as shown top image below. 
but if I select any option again, I got the middle image. the display of 
the tree is compress and left-shifted.
even though the display is compress, I can still refocus/drill-down just 
that the display is off-set left out of the page as shown in the last image.

please help. thanks, Robert

<https://lh3.googleusercontent.com/-YBFS0zmXmT0/WGwdK7EgccI/AAAAAAAAAkc/BQD4sB6xJNIVd7zhvzvOjjhSTSw3KHA0ACLcB/s1600/ok.JPG>


<https://lh3.googleusercontent.com/-k58OE-c648U/WGwddBpdHII/AAAAAAAAAkg/l_9QaXF8IVk1iFh0fDJu_7HsPRhrfCmOwCLcB/s1600/notok.JPG>

<https://lh3.googleusercontent.com/-jjkX585Ssg8/WGwfDklPmxI/AAAAAAAAAks/GmftiOv3TnQJEh2VpOUlgaAd-riTp6dlwCLcB/s1600/notok_focused.JPG>



-- 
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/b8bf20e4-e39d-4bc2-95f3-2f4550d5e80d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to