Skip to content

Customizing Filter UI

This example demonstrates three key filter UI customizations:

1. Count Badges — Display the number of matching nodes next to each filter option.

2. Reset Button — Add a reset button that clears all active filters with one click.

3. Hover Highlighting — Highlight corresponding nodes in the chart when hovering over a filter option.

How It Works

The example uses filterUI events:

  • add-item to customize filter options with count badges
  • update to handle the reset button click
  • show-items to highlight nodes on hover