Reputation: 3254
So basically I'm using the Highcharts JavaScript library to render a very simple line graph to my HTML5 page. The chart represents the volume of tweets I've crawled from Twitter.
So my question is for anyone who has a fair idea of what Highcharts is capable of. I know you're able to highlight a section of the chart and have it zoom in. Is it possible to have the chart recognize the start and end time I've highlighted and give it back to me.
I wanna be able to query my database and pull out all the tweets between the two times and render them to the page. Anyone any idea if that's feasible?
Upvotes: 3
Views: 162
Reputation: 37578
Yes it is possible, you can achieve it by catching afterSetExtremes function.
events:{
afterSetExtremes:function(){
alert(this.min);
alert(this.max);
}
}
If you would like to get dates, then you can use dateFormat() http://api.highcharts.com/highcharts#Highcharts.dateFormat()
Upvotes: 1