invoke tooltip programmatically form selection inconsist

39 views
Skip to first unread message

sylviat84

unread,
Jan 27, 2016, 8:40:39 PM1/27/16
to Google Visualization API
I have 2 screens:

1- has (a) piechart and (b) tablechart, both generated with same underlying data
2- has (a) column chart and (b) tablechart, also both generated with same underlying data

On both 1- and 2- there are selection listeners on all charts such that  (a) listens for a selection on (b) and vice versa.  When an item is selected in (a), (b) updates it's selection to match (a), and vice versa.  

Tooltip option is "tooltip : {trigger: 'selection'} " on both the piechart (1-(a)) as well as  the table chart (2-(a)).
When the user clicks directly on 1-(a) or 2-(a) the tooltip works fine.  
But, when the user invokes a select event programmatically, the tooltip works on the piechart but does not work not on the column chart.

Gory details:  
on screen 1-, when the user clicks an item in (b), the piechart (a) is visibly selected & the tooltip DOES appear.
on screen 2-, when the user clicks an item in (b),  the column chart (a) is also visibly selected but --PROBLEM: the tooltip does NOT appear--.

Any explanation/fix for this?

thanks very much




Sergey Grabkovsky

unread,
Jan 28, 2016, 10:00:29 AM1/28/16
to Google Visualization API
Hi,

I attempted to reproduce this issue for a column chart, but was unable to. Here's an example of a ColumnChart using programmatic setSelection to select a random datum every 2 seconds: http://jsfiddle.net/ad34m3or/

If this doesn't help you with your issue, please post a link to either your website or a jsfiddle that reproduces the issue that you're experiencing.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/6d86e91b-7b74-484b-8957-1ac5ea47fcf3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

unnamed.gif

Sergey Grabkovsky

Software Engineer

Google, Inc

gra...@google.com


Sylvia Trembowelski

unread,
Jan 28, 2016, 11:22:00 AM1/28/16
to google-visua...@googlegroups.com
Thank you so much.  From your example I was able to figure out my error.
 
I was setting 'column: null’  in 
chart.setSelection([{row: row, column: null]);
for both piechart and column chart.

It works in piechart.  I changed ‘column:1’ for column chart, as per your example, and it too works perfectly.  

Thanks so much for the great, prompt response.

You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/nKkJA7d5IY8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.

Sergey Grabkovsky

unread,
Jan 28, 2016, 11:25:08 AM1/28/16
to google-visua...@googlegroups.com
You're welcome!

For further clarification, the primary difference lies in the fact that a ColumnChart may have multiple series (which are represented as columns), where for a pie chart, each row is a series, and it may not have another column that represents data. Therefore, for a PieChart, the selection model is row-based (specify a row with a null column), but for a ColumnChart, the selection model is cell-based (specify a valid row and column).


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages