Hi all,

I use the Google pie chart. I generate the script from a server java class 
and let it show in a browser. I have a different java script that contains 
a function. My question is: How can I call this function from my generated 
Google pie chart script:

 +       "var options = {'title':'Content Type', "
                 +                      "'width':800, "
                 +                      "'height':600," 
                 +                        
"'chartArea.left':'50%',colors:['red','#706464','#E9DCDC','#3D0808','black']}; 
"
                 +       "var chart = new 
google.visualization.PieChart(document.getElementById('Formular')); "
                 +       "function selectHandler() { "
                 +         "var selectedItem = chart.getSelection()[0]; "
                 +         "if (selectedItem) { "
                 +           "var auswahl = data.getValue(selectedItem.row, 
0); "
                 +           "alert('The user selected ' + auswahl); " 
<---------------------------------------------------------------------------Works
 
perfect!
                 //+            
 
"suSo.push('{\"Funktion\":\"antworten\",\"Text\":\"type\",\"Wert\":auswahl}');" 
<-------------------Causes the pie chart not to show up when enabled?
                 +         "} "
                 +       "} "
                 +       "google.visualization.events.addListener(chart, 
'select', selectHandler); "    
                 +       "chart.draw(data, options); "
                 +     "} "
                 +   "</script> ";

I only started to use the GPC. So this might be a newbee question.

Thank you in advance
Olaf    

-- 
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 
http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to