Integrating Data Brushing (select) between two charts

40 views
Skip to first unread message

visual_learner

unread,
Jun 24, 2011, 9:42:09 PM6/24/11
to Google Visualization API
I am trying to have a point selected in a scatterchart highlight the
corresponding row in a table and vice-versus. Is this possible? It
works between two tables but doesn't work when incorporating
sparklines or scattercharts. When I click a point in the scatterchart
the select listener is flagged (and appropriate value selected).
However, the actual point in the scatter chart doesn't seem to be
selected (it doesn't change color or indicate it is different from the
rest of the points). On mouseover it shows the label for each point,
but nothing happens when clicked (aside from calling the listener).

My code (which handles the selecting) is like the following:

//For a table (this works between two tables)
container.chart.setSelection(brushSelect);

//For a scatterchart (never works)
container.chart.setSelection([{row: brushSelect.getSelection()
[0].row}]);

visual_learner

unread,
Jun 24, 2011, 10:34:35 PM6/24/11
to Google Visualization API
Just an update, the code above actually updates the table as well. So
if I select a point on the scatterplot it will highlight the
corresponding row of the table. The problem seems to be that the
points of the scatterplot are not selectable. When clicked they don't
change color, highlight, or do anything to distinguish that they have
been selected.

visual_learner

unread,
Jun 24, 2011, 11:17:19 PM6/24/11
to Google Visualization API
After doing some research it seems that corecharts do not have a
setselection method implemented yet. Therefore I guess I can't
actually set the data for them.


Can someone else, deny or corroborate this for me?


http://groups.google.com/group/google-visualization-api/browse_thread/thread/57f873605ac1cc20/90498e98c3f8dfcf

Jinji

unread,
Jun 26, 2011, 3:37:24 AM6/26/11
to google-visua...@googlegroups.com
Don't confuse "no selection" and "no visual cue for selection". The latter is correct, while the former is incorrect. setSelection is indeed implemented, and if you'll call getSelection you'll see it, as well events fired for 'select'. There is, however, no visual cue for the selection, at the moment.

--
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-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.


Reply all
Reply to author
Forward
0 new messages