powerbivisualizationpowerbi-desktopvegadeneb

Vega performant toggling visibility of marks


Is there a better way to dynamically toggle the visibility of a group of marks than to set the height of a their containing group mark to zero? Especially if the marks in a group with zero height are still being processed and impacting performance. Having a look here I can't find a setting like active which would control processing for all marks in a group mark.


Solution

  • Have you set clip to true and height to zero. If you're having performance issues, the best way is to handle this via data. i.e. 1000 rows in your data will generate a 1000 marks but if you set a filter driven by a signal to filter them out, then they will no longer be generated when you don't need them. The best way to make something invisible is not to generate the mark at all.