Hi,
I am new to the Google Visualization API.
I would like to get a chart looking like the one in the following website :
http://letour.yorkshire.com/stage-1 . I have thought of using the
ChartRangeFilter ControlWrapper. I try handling the statechange events to
get an invariable interval but I haven't succeed.
Here is my code :
function stateChangeHandler(a){
if (a.startChanged == true && a.endChanged == true){
var chart = document.getElementById("chart");
var pos = (control.getState().range.end + control.getState().range.start)/2;
chart.style.left = pos*4;
}
if (a.startChanged == false && a.endChanged == true ){
control.setState({'range': {'start': control.getState().range.end-10,
'end': control.getState().range.end}});
control.draw();
var chart = document.getElementById("chart");
var pos = (control.getState().range.end + control.getState().range.start)/2;
chart.style.left = pos*4;
}
if (a.startChanged == true && a.endChanged == false){
control.setState({'range': {'start': control.getState().range.start, 'end':
control.getState().range.start+10}});
var chart = document.getElementById("chart");
var pos = (control.getState().range.end + control.getState().range.start)/2;
chart.style.left = pos*4;
}
}
Here is the link so you can see the my problems :
http://wgs3.s3.amazonaws.com/perso/dlecole/ASO/chartrangefilter.html
Do you have any idea how to do or if there is a more adapted solution
without using ChartRangeFilter?
Regards,
Damien Lécole
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.