Hi everyone. I can't seem to get a 'ready' event listener working. The
timeline loads properly, but I never get the "ready!" alert box.
Here's the relevant code:

function draw_timeline(term, start, end) {
  var url = "http://localhost:8080/?term="; + term + "&start=" + start
+ "&end=" + end;
  var query = new google.visualization.Query(url);
  query.send(callback_draw_timeline);
  if ( $("#timeline").is(":hidden") ) { $("#timeline").show(); }
  function callback_draw_timeline(response) {
    if (response.isError()) {
      alert("Error in query: " + response.getMessage());
      return;
    };
    var data = response.getDataTable();
    var timechart = new
google.visualization.AnnotatedTimeLine(document.getElementById('timeline'));

    google.visualization.events.addListener(timechart, 'ready',
function() {
      alert("ready!")
    });

    timechart.draw(data, {displayRangeSelector: false} );
  };
};

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart 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-chart-api?hl=en.

Reply via email to