Group Legend selection


#1

Hi guys, I am using the Legend widget to highlight chart elements when users hover on legend items. However, when users click on legend items to add filters, I’d like to limit to only one selection at a time. Is this possible?


#2

Hi @frank, are you setting the Interaction Manager to use client filters for your Group Legend widget?


#3

Hi @arturo, yes I defined a rule so that the Interaction Manager applies client filters to my Group Legend. However, when users click on multiples items on the Group Legend, it is allowing them to multiselect. I just want to limit to one selection at the time.


#4

Hi @frank, I get your idea and to do that just need to use the selectMode option inside the configuration of the widget and set to single. See the following code:

.set("options", { selectMode: "single" })


#5

Hi @arturo, thanks!!!