Hello,

I am trying to use the API to create an interactive pie chart based on
a user's form selections.  jQuery is used to update the div upon a
selection change.  I used to use a simple image from the google charts
API, and this worked perfectly.  But now that I have modified the code
to put javascript in the div, the div reloads empty.  When I run the
javascript on its own in a separate file, it works fine, just not when
trying to refresh through jquery.

Here are the last 2 lines of the javascript to produce the chart
('leadchart' is the id of the div tag to print to):

var chart = new
google.visualization.PieChart(document.getElementById('leadchart'));
chart.draw(data, {width: 400, height: 240, is3D: true, title: 'Lead
Graph'});

Here is my jQuery function to handle when the form selection is
changed:

$("#dateRange").change(function(){
        $.get("/includes/get_chart.php", { dateRange: $
("#dateRange").val() },
          function(data){
                $("#leadchart").html(data);
          });
 });

Anyone know how to get this able to refresh dynamically?
Thanks in advance!

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