Hi,

Further information - I would simply like a mirror-ed selection. If
the user picks a row in the data table, it will also reflect in the
scatter chart ( and vice versa ). However, I figured due to the format
difference, a simple event handler such as:

// When the table is selected, update the orgchart.
google.visualization.events.addListener(table, 'select', function() {
  orgchart.setSelection(table.getSelection());
});

// When the orgchart is selected, update the table visualization.
google.visualization.events.addListener(orgchart, 'select', function()
{
  table.setSelection(orgchart.getSelection());
});

Would not do.


On Mar 18, 3:10 pm, p00kie <dans...@gmail.com> wrote:
> Hi,
>
> Can you explain further in depth how to determine what kind of data
> getSelection returns?
>
> On Mar 18, 2:59 pm, VizBoy <viz...@google.com> wrote:
>
> > Hi,
>
> > An event handler is never between two visualizations. An event handler
> > always listens on one visualization.
> > In the handler itself you can interact with other visualizations, by calling
> > their methods, but this is entirely up to you.
> > So the answer is -- yes. Question is, what exactly do you want to do? But in
> > general, once you're in the handler, do what you want. You can get the
> > selection from one visualization, manipulate it in whatever way you want
> > using javascript and you can set the selection in another visualization in
> > any way you want.
>
> > Hope this helps.
>
> > - VizBoy.
>
> > On Wed, Mar 18, 2009 at 7:59 PM, p00kie <dans...@gmail.com> wrote:
>
> > > Is it possible to have an event handler between these two?
>
> > > Even if the data set is different..
>
> > > Table:
> > >                data.setCell(i, 0, String(id));
> > >                data.setCell(i, 1, String(pi));
> > >                data.setCell(i, 2, String(ci));
> > >                data.setCell(i, 3, String(dt));
> > >                data.setCell(i, 4, String(lat));
> > >                data.setCell(i, 5, String(lon));
> > >                data.setCell(i, 6, String(wav));
> > >                data.setCell(i, 7, String(name));
> > >                data.setCell(i, 8, String(val));
>
> > > Scatter Chart:
>
> > >                data.setValue(i, 0, Number(wav));
> > >                data.setValue(i, 1, Number(val));
--~--~---------~--~----~------------~-------~--~----~
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