Skip to content

Conversation

@bencap
Copy link
Collaborator

@bencap bencap commented Sep 30, 2025

This pull request enhances the display and logic of range classifications in the histogram component, focusing on how range classification badges are shown in tooltips and on the chart itself. It introduces improved handling for overlapping shader ranges, configurable rendering of shader titles, and clearer visual presentation of classification information.

Histogram Tooltip & Classification Badge Improvements

  • Tooltips now show a colored classification badge next to the score and a detailed list of all overlapping range classifications for each bin, including handling of bins overlapping multiple ranges. [1] [2]
  • Added a new CSS class .mavedb-range-classification-badge for consistent styling of these badges in tooltips.
  • See below for how this can help clarify the range labels when hovering the mouse or when viewing the tooltip for a selected variant.
Screenshot 2025-09-30 at 12 48 52 AM Screenshot 2025-09-30 at 12 47 40 AM

Shader Range Logic & Utilities

  • Added the shaderOverlapsBin utility to determine if a shader range overlaps a histogram bin, treating both as half-open intervals and handling unbounded ranges. This function is now used in tooltip logic and exported for reuse.

Histogram Rendering Options

  • Introduced the renderShaderTitles property and accessor to Histogram objects, allowing titles to be shown, hidden, or automatically hidden if they do not fit within their region. The rendering logic in the chart was updated to respect this setting. [1] [2] [3] [4]
  • Note in the screenshot below the effects of this change, where labels are only shown on large ranges. This usually works out pretty well, since the ranges on the edge are the ranges that are larger and it's easy to work your way in based on the range table.
Screenshot 2025-09-30 at 12 45 52 AM Screenshot 2025-09-30 at 12 46 28 AM

Range Labeling

  • Range labels in shaders are now set to the evidence strength label if available, improving clarity in classification display.

…sibility

Adds a new property `renderShaderTitles` accessor to control shader title visibility. This property has three settings: `show`, `hide`, and `auto`:
- `show`: Always shows the shader title
- `hide`: Always hides the shader title
- `auto`: Calculates the width of the range shader and title text box. If the width of the text is wider than the width of the shader, don't display it. Otherwise, display the title text.
…nd variants

In support of these classification labels, adds a new function for detecting overlap of bins and shader regions. Opens #491 as an enhancement to this solution.
@bencap bencap linked an issue Sep 30, 2025 that may be closed by this pull request
…dded with a datum selected

When a datum was selected in a series index larger than the length of the prior list of series options, the histogram was attempting to select from a undefined series. Fix this issue by refreshing the histogram prior to selecting the datum.
@bencap
Copy link
Collaborator Author

bencap commented Sep 30, 2025

To be merged with release-2025.4.2.

@jstone-dev jstone-dev changed the base branch from release-2025.4.1 to release-2025.4.2 October 1, 2025 01:21
@jstone-dev jstone-dev merged commit a5edebd into release-2025.4.2 Oct 1, 2025
@bencap bencap mentioned this pull request Oct 3, 2025
@bencap bencap deleted the feature/bencap/425/overlapping-histogram-labels branch November 11, 2025 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Score range labels often overlap on the histogram

3 participants