Hello,
I am a little baffled by something. Basically, I am building an
anootatedTimeline. Everything on the timeline is working great, but
the first time a user interacts with the rangeHandler from the 1d 5d
1m etc... menu, it does nothing, however, if they click a selection
again, it works. So, when the page loads, it takes two clicks to get a
response from the chart on the rangeHandler. After the second click,
it continually works fine until another reload. Below is a code
snippet.
var data = response.getDataTable();
var chart = new google.visualization.AnnotatedTimeLine
(document.getElementById('annotated_timeline'));
var colorRange = buildChartColorScheme(sentimentRange);
chart.draw(data, {
width: 610,
height: 280,
legendPosition: 'newRow',
thickness:'3',
fill:'9',
displayRangeSelector:false,
colors: colorRange
});
google.visualization.events.addListener(chart, 'ready',
readyHandler);
google.visualization.events.addListener(chart, 'rangechange',
rangeHandler);
function readyHandler() {
var startDate = $('#i_startDate').val();
var endDate = $('#i_endDate').val();
chart.setVisibleChartRange(startDate,endDate);
}
function rangeHandler(start) {
alert(start.start);
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---