Hi Daniel, thanks for your answer.

I think I got the problem: new Tree Map version conflicts with a quite old 
javascript framework I use specifically in this project to pull data via 
AJAX based on wich element you select in the treemap. The framework is 
"PrototypeJS". When I load the framework with the current version of Tree 
Map the "tree.getSelection()" method returns ad undefined object instead of 
an array of one element. If I disable the framework loading, the method 
returns the array as usual.

So this is basically a problem of mine. :)
I think I'll continue using the v49 which is perfect for my purpose.

Thanks again for your help,
regards.

Il giorno lunedì 17 maggio 2021 alle 17:10:16 UTC+2 Daniel LaLiberte ha 
scritto:

> 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]
>

-- 
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/dd773f69-c1d9-48f1-b27a-12a837659a4en%40googlegroups.com.

Reply via email to