I have pieced together bits of code (am a newbie) to create a series of drop down lists that are used to navigate to sections of an interactive chart. It uses the onClick event to make a selection. I'm wondering if anyone has a idea about the best way to get this to function in Safari and Chrome (it works perfectly on Firefox and Opera).
I have included an example of the code for zooming by month, but I also have an option for zooming by fortnight, week and day. The code is found below.
var minDate = g.xAxisRange()[0];
var maxDate = g.xAxisRange()[1];
var minValue = g.yAxisRange()[0];
var maxValue = g.yAxisRange()[1];
showDimensions(minDate, maxDate, [minValue, maxValue]);
function showDimensions(minDate, maxDate, yRanges) {
showXDimensions(minDate, maxDate);
showYDimensions(yRanges);
}
function showXDimensions(first, second) {
var elem = document.getElementById("xdimensions");
elem.innerHTML = "dateWindow : [" + first + ", "+ second + "]";
}
function showYDimensions(ranges) {
var elem = document.getElementById("ydimensions");
elem.innerHTML = "valueRange : [" + ranges + "]";
}
Bookmarks