getsentry / getsentry/sentry

[Dashboards] Sort widget hover tooltip series by value at the hovered point

Open
#118,864 3 comments 0 reactions 1 assignee Claimed by @mjq View on GitHub
3. Medium Dashboards Improvement Product Area: Dashboards
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
21h 10m
Merged PRs (30d)
635

Description

### Problem Statement

Multi-series chart widgets (for example a breakdown by outcome, status code, environment, or release) display their hover tooltip in a fixed order, typically the series or legend order. When several series are shown at once and their relative magnitudes change over time, it is hard to see which series is dominant at a given point. This is especially painful on operational dashboards with many series where the top contributor shifts across the window.

**Why current behavior is insufficient**
Users scan the tooltip to find the top contributors during monitoring and triage. A fixed-order list forces manual scanning and undercuts the value of grouped widgets. The plotted top-N/limit and the widget builder "sort by" affect which series appear and their series order, but the tooltip itself is not re-ranked by value.

### Solution Brainstorm

**Proposed solution**
Sort the tooltip entries dynamically by value (descending) at the hovered x-axis point so the largest contributor is always at the top. This matches the behavior of Grafana, Datadog, and similar observability tools. Optionally expose a widget-level or dashboard-level toggle (sort by value vs. sort by legend order) to preserve existing behavior for users who rely on consistent ordering.

**Acceptance criteria**

- [ ] Tooltip entries are ordered by value (descending) at the hovered point.
- [ ] Ties are broken deterministically (for example alphabetically by label).
- [ ] Works for chart widget types with hover tooltips (line, area, bar).

### Product Area

Dashboards

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.