There shouldn't be any problem with redrawing the visualization.
If you want me to help you debug, please try to create an example that
doesn't depend on an external url (create the DataTable locally in the
javascript) then we can try to find the problem together.

- VizBoy.

On Wed, May 20, 2009 at 8:45 AM, DennY <[email protected]> wrote:

>
> Is there a way to redraw the area chart on a button click?.
>
> i have tried the following code
>
>
> <script type="text/javascript" src="http://www.google.com/jsapi";></
> script>
> <script type="text/javascript">
> var url = 'default.aspx?getdata=2';
> google.load('visualization', '1', { packages: ['areachart'] });
> function drawVisualization() {
>    new google.visualization.Query(url).send(
>
> function(response) {
> new google.visualization.AreaChart(document.getElementById
> ('visualization')).draw(response.getDataTable(), null);
> });
>
> }
>
>
>
> google.setOnLoadCallback(drawVisualization);
>
> function drawgraph() {
>    url = 'default.aspx?getdata=' + document.getElementById
> ('Text1').value;
>    drawVisualization();
>
> }
> </script>
>
> but i am getting an error "could not complete the operation due to
> error 80020101"
> while calling the drawgraph function
>
>
> >
>

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

Reply via email to