Hi, thank you for your help. I managed to workaround the problem by
integrating the chart api functions in my main script. BW Olaf


2013/4/27 asgallant <[email protected]>

> Open the page in Chrome and view the developer's console (ctrl+shift+j to
> open).  What error message(s) do you see?
>
> Also, if you need help debugging, posting a link to the page or a copy of
> the code as seen by a browser (after it has been rendered by the server,
> open the page and view the source to get it) is most helpful to us.
>
>
> On Saturday, April 27, 2013 2:55:38 AM UTC-4, Olaf wrote:
>>
>> 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 a topic in the
> Google Groups "Google Visualization API" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-visualization-api/nUkrjN_jEAQ/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, 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.
>
>
>

-- 
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