Hi Simone,

The getSelection method should return whatever the current selection is,
which sometimes can be "nothing".   Clicking on a selected item also
typically toggles the selection, so that whatever was previously selected
no longer is.  So, in order for us to reproduce the problem you are seeing,
you have to describe the sequence of events and the state of the selection
before and after the events.

The Treemap chart was changed in v50 to support additional event
configuration options.  It is possible that something was broken
unintentionally, but more likely, we have cleaned up a previously
unintentional bug that you were taking advantage of.  Either way, we would
like to know.

On Mon, May 17, 2021 at 4:38 AM Simone Fracassa <[email protected]>
wrote:

> I temporarily solved by loading the previous version of libraries (49).
>
> Il giorno giovedì 13 maggio 2021 alle 14:52:02 UTC+2 Simone Fracassa ha
> scritto:
>
>> Hello, I noticed the getSelection() method is not working anymore in all
>> of Tree Map Charts I've created since years. They've always worked, but
>> suddenly the getSelection method stopped returning the row/column value of
>> selected item.
>>
>> I tried this debugging handler and it returns "nothing", when normally,
>> in Tree Map case, it should return the row value: getSelection()[0].row
>>
>>
>> function selectHandlerTree() {
>>            var selection = tree.getSelection();
>>   var message = '';
>>
>>   for (var i = 0; i < selection.length; i++) {
>>     var item = selection[i];
>>     if (item.row != null && item.column != null) {
>>       message += '{row:' + item.row + ',column:' + item.column + '}';
>>     } else if (item.row != null) {
>>       message += '{row:' + item.row + '}';
>>     } else if (item.column != null) {
>>       message += '{column:' + item.column + '}';
>>     }
>>   }
>>   if (message == '') {
>>     message = 'nothing';
>>   }
>>   alert('You selected ' + message);
>>         }
>>
>> Thanks.
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/9ca143f7-3b38-43ad-b790-6b47985919cdn%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/9ca143f7-3b38-43ad-b790-6b47985919cdn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 

• Daniel LaLiberte

 • SWE

 • Cambridge MA

 • [email protected] <[email protected]>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJO1LJeWsvJ3hyTOj8ppyPNt90j3baOTkQLd6_coU1dR4A%40mail.gmail.com.

Reply via email to