That's true. I was looking for something in the use of the API, and I didn't observed this little mistake.
Thanks! On Nov 9, 1:49 pm, charter vis <[email protected]> wrote: > Hi Anderson, > I looked at your code and saw that you are declaring the chart as a > local variable in one method: > function drawChart() { ... > *var* chart = new > google.visualization.AreaChart(document.getElementById('div_chart')); > > and trying to use the same variable on the handler method: > function selectHandler() { ... > var selection = chart.getSelection(); > > So the handler execution crashes at this point. > Perhaps you would like to declare the handler method inside the > drawChart method > > On Nov 9, 2:41 pm, Anderson Arcenio <[email protected]> wrote: > > > I made a simple example page to demonstrate this. > > >http://www.andersonarcenio.com/areachart.html > > > When you click in a pont, you will see an "alert()", but the function > > getSelection() isn't returning or I'm calling it in the wrong way. > > > What do you think can be? > > > Thanks. > > > On Nov 9, 8:22 am, Jinji <[email protected]> wrote: > > > > What do you mean by "isn't returning the data"? > > > At the bottom of the section you refer to there's a link to a playground > > > example<http://code.google.com/apis/ajax/playground/?type=visualization#selec...>. > > > There you can see getSelection() in action, and it works. If there's > > > something that doesn't work, please provide an example page that > > > demonstrates the problem. > > > > On Mon, Nov 8, 2010 at 3:34 PM, Anderson Arcenio > > > <[email protected]>wrote: > > > > > I'm trying to use this example: > > > > >http://code.google.com/apis/visualization/documentation/events.html#T... > > > > > But the method getSelection() isn't returning the data. > > > > > Is there any different way to use the event Select in Area Chart? > > > > > Thanks. > > > > > -- > > > > 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.
