-
-
Notifications
You must be signed in to change notification settings - Fork 668
Description
I'd like to add a feature to hide/filter out zero/null values in the tooltip, and potentially sort the tooltip by the value of each field/column. Here's an example:

Basically I want to hide type3 and type5 in the tooltip, and sort the remaining by descending order of Value.
Since I'm not familiar with altair/vega libraries, so this might not be the best approach, but my thought is to add a new parameter/condition in altair and passing this to the tooltip object, so that when the frontend receives this signal, it will hide the values I don't want to see in the tooltip and possibly sort the values.
I found 2 places that can be modified:
- https://github.com/vega/vega-lite/blob/4ba3b93e575df97ffe56713287b40d6c55b18340/src/compile/mark/encode/tooltip.ts
- https://github.com/vega/vega-tooltip/blob/5f805fb8a6e76e3e58d2541e51b6106bcc133f11/src/Handler.ts
Any guidance and suggestions are welcome. Thanks! cc @joelostblom @jakevdp as well as core vega-lite developers @kanitw @domoritz @arvind @jheer