Skip to content

Add support for highlighting a source on hover on its legend item

Arjen Hiemstra requested to merge work/ahiemstra/itemhover into master

This introduces a new property, highlight on charts that, when set, will display the specified item "highlighted", which effectively means reducing the visibility of the other items. It also adds hover highlighting to Legend, which will highlight a legend entry on hover and exposes the highlighted index. Combined this allows charts to highlight an item when its corresponding legend entry is hovered, which helps clarify which item corresponds to which legend entry. There's also a bunch of refactoring changes included that clean up the charts example.

Screenshots:

Unhighlighted Highlighted
Bar Chart Screenshot_20240417_141948 Screenshot_20240417_141541
Pie Chart Screenshot_20240417_142018 Screenshot_20240417_141511
Line Chart Screenshot_20240417_142008 Screenshot_20240417_141444
Edited by Arjen Hiemstra

Merge request reports

Loading