Nevermind - Figured it out: 'rangeChange' should be 'rangechange'.
Silly syntax errors!

Thanks!
Max

On Apr 19, 4:33 pm, MaxPower <rbeck197...@gmail.com> wrote:
> Hi all!
>
> Here's some code I've written to create an Annotated TimeLine chart:
>
> function drawATrend(arrADate, arrComp, arrA1, arrA2, arrA3, arALength)
> {
>         var Achart = new
> google.visualization.AnnotatedTimeLine(document.getElementById('Atrend'));
>         var Adata = new google.visualization.DataTable();
>         var aADate = new VBArray(arrADate);
>         var aComp = new VBArray(arrComp)
>         var aA1 = new VBArray(arrA1);
>         var aA2 = new VBArray(arrA2);
>         var aA3 = new VBArray(arrA3);
>
>         var vbADate = aADate.toArray();
>         var vbComp = aComp.toArray();
>         var vbA1 = aA1.toArray();
>         var vbA2 = aA2.toArray();
>         var vbA3 = aA3.toArray();
>
>         Adata.addColumn('date', 'Date');
>         Adata.addColumn('number', 'Missing');
>         Adata.addColumn('number', 'P/N');
>         Adata.addColumn('number', 'QTY');
>         Adata.addColumn('number', 'MOD');
>
>         for (j=0;j<=arALength;j++){
>                 Adata.addRows([
>                         [new Date(vbADate[j]), vbComp[j], vbA1[j], vbA2[j],
> vbA3[j]]
>                 ]);
>         }
>
>         chartAOptions = {
>                 displayAnnotations: true,
>                 thickness: 4,
>                 fill: 0,
>                 legendPosition: 'newRow',
>                 wmode: 'transparent',
>                 scaleType: 'maximized'
>         };
>
>         Achart.draw(Adata, chartAOptions);
>         google.visualization.events.addListener(Achart, 'rangeChange',
> updateDefTab);
>
>       }
>
> And a test handler function:
>
> function updateDefTab(){
>
>                 alert('The trend range is ' + 
> Achart.getVisibleChartRange().start +
> ' to ' + Achart.getVisibleChartRange().end);
>         }
>
> Thing is, when the user changes the zoom range on the timeline chart,
> the event isn't thrown (or at least, the alert isn't fired).
>
> Any ideas?
>
> Thanks!
> Max

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to google-visualization-api@googlegroups.com.
To unsubscribe from this group, send email to 
google-visualization-api+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to