Hi VizGuy, thanks for the answer...
I've already seen the methods you're talking about, and I'm using them
when I refresh the page in order to hide/show a specific data
series... I submit the information about the series to hide/show via
POST and call the 'drawChart()' function again, now without forgetting
the 'showDataColumns()' method... Now the main point is to avoid
having to refresh the whole page.
Would those methods work without having to call the 'draw()' function
again? Like, let's say, could the 'handleClick()' JavaScript function
be something like this:
function handleClick(arg){
showDataColumns(arg);
}
That would be exactly what I want! I tried to use
'chart.showDataColumns(arg)' but it didn't work since the object
'chart' it's only used inside the 'drawChart()' function as you show
in the examples... Also tried to create the 'chart' object outside the
initialization function, however, nothing worked again...
Probably all of this is quite confusing to you, just keep in mind
that, after the info you just gave me, my main objective now is to
understand how to use the 'showDataColumns()' and 'hideDataColumns()'
methods and actually see a specific data series hide and show
repeatedly as I click a checkbox!
Thank you very much for your quick answer by the way!
ADNR
On Mar 16, 7:35 am, VizGuy <
viz...@google.com> wrote:
> There are methods you can call to show and hide specific "lines" (data
> series).
> See showDataColumns and hideDataColumns athttp://
code.google.com/apis/visualization/documentation/gallery/annot...
>
> We are working on a light 'redraw' mechanism to similar cases, but it is
> still under development.
>
> I believe the methods described above will work for you.
>
> Regards,
> VizGuy
>
>
>
>
>
> On Mon, Mar 16, 2009 at 2:49 AM, adamiaonr <
adamia...@gmail.com> wrote:
>
> > Hi there!
>
> > This is probably kind of a newbie question, I'll go straight to the
> > point:
>
> > I'm working with an Annotated Time Line chart that holds more than one
> > series. My objective is to allow the user to hide/show a specific
> > series through the use of checkboxes... You can take a look at it
> > through here:
http://paginas.fe.up.pt/~ee04010/energy/linechart.php<
http://paginas.fe.up.pt/%7Eee04010/energy/linechart.php>
>
> > Now, I've accomplished this using the most inelegant of the methods,
> > basically by calling the same page, submitting the numbers of the
> > columns to be hidden/shown...
>
> > What I would like to know is if it is possible to call the draw()
> > method again in order to 'redraw' the chart, without having to refresh
> > the whole page...
>
> > For example, by clicking on a checkbox, a JavaScript function (let's
> > call it "handleClick()") would be able to call the draw method for the
> > initialized chart...
>
> > I already tried to do it by making the handleClick() function to call
> > the drawChart() initializing function, which is exactly the same as
> > the one shown here:
> >
http://code.google.com/apis/visualization/documentation/gallery/annot....
> > ..