Dash - callback on legend item clicked

Hi Emmanuelle, thanks for your answer!

However, I couldn’t help but notice that the data your Pre section is displaying does not exactly provide what avivazran (and I) are looking for: Output which displays which categories are currently visible.

Output of the restyleData solely provides information on which category was turned off/on most recently. Is there a way to generate an output which provides a complete list of the categories and their visibility status? (meaning: If the legend/color variable consists of three countries (“USA”, “GER”, “RUS”), outputting or updating a dictionary like that: {“GER”: True|False, “GER”: True|False, “USA”: True|False, “RUS”: True|False})

hope the question was clear!

1 Like