Same problem here. You can have a look here: http://gillezz.free.fr/google/. I took Google's example, changed the initial zoom, and added a few buttons at the bottom. According to the documentation, the four buttons should do the same thing: zoom out, yet the only working parameter combination is (set, set). As soon as one of the parameters is null, Firebug throws a "a/b is null" error.
Tylercook, new Date(null) returns Unix Epoch (January 1, 1970). That explains why you get what you are looking for when used as the first parameter. On Nov 9, 5:26 pm, tylocook <[email protected]> wrote: > Actually, that may not be the solution. It still acts strangely. > Especially if I try chart.setVisibleChartRange(range['start'], new > Date(null)); > > On Nov 9, 5:15 am, Jinji <[email protected]> wrote: > > > I think that passing nulls is allowed, and the test page you sent actually > > calls it null and no error is thrown. So as to the initial problem you > > described, I looked at your code and you call chart.setVisibleChartRange() > > twice consecutively (lines 70, 71), so only the second call applies, and > > that second call is: > > > chart.setVisibleChartRange(range['start'], null); > > > which means the start time stays the same. You should > > call chart.setVisibleChartRange only once, with (null, null); > > > On Mon, Nov 8, 2010 at 8:04 AM, tylocook <[email protected]> wrote: > > > Hm.. > > > > It seems attempting to do this throws some kind of error. I'm not an > > > expert in JavaScript, so I'm not really sure how to find out what the > > > error is. All I know is that it kicks out of my function after this > > > line. > > > > chart.setVisibleChartRange(new Date(2008, 1, 1), null); > > > > According to the documentation, this function call should do the > > > following. > > > > "Sets the visible range (zoom) to the specified range. Accepts two > > > parameters of type Date that represent the first and last times of the > > > wanted selected visible range. Set start to null to include everything > > > from the earliest date to end; set end to null to include everything > > > from start to the last date." > > > > This line works without a problem: > > > > chart.setVisibleChartRange(new Date(2008, 1, 1), new Date(2009, 12, > > > 12)); > > > > So, it seems passing null as a parameter is not actually allowed? > > > > On Nov 7, 10:34 am, Jinji <[email protected]> wrote: > > > > Can you send a demo page that demonstrates the problem? > > > > > On Sat, Nov 6, 2010 at 4:30 AM, tylocook <[email protected]> wrote: > > > > > I have a Table where I select varying columns to show and hide > > > > > different data lines on the AnnotatedTimeline chart. > > > > > > However, if I show a particular piece of data and then show another, > > > > > the zoom does not always encompass them both. > > > > > > According to the documentation, calling this should remedy my problem, > > > > > but it does not. > > > > > > var range = chart.getVisibleChartRange(); > > > > > chart.setVisibleChartRange(null, range['end']); > > > > > > Does anyone know what I can do? > > > > > > -- > > > > > 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]<google-visualization- > > > > > api%[email protected]><google-visualization- > > > api%[email protected] <api%[email protected]>> > > > > > . > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/google-visualization-api?hl=en. > > > > -- > > > 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]<google-visualization- > > > api%[email protected]> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-visualization-api?hl=en. -- 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.
