fix(heatmap): correct tooltip display to show axis values instead of indices - #38487
Conversation
…indices The tooltip was showing numeric indices (0, 1, 2...) instead of the actual axis values after PR #36302 changed the data structure to use indices. This fix looks up the actual x/y axis values from the sorted arrays before formatting them for display in the tooltip. Also fixes percentage calculation to use actual values instead of indices when normalizeAcross is enabled. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code Review Agent Run #95ef6fActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
alexandrusoare
left a comment
There was a problem hiding this comment.
LGTM - can we also add some tests so that this won't regress in the future?
Yes, good call out. Will add these in a follow up PR |
SUMMARY
Fixes a bug where heatmap tooltips display numeric indices (0, 1, 2...) instead of the actual axis values.
Root cause: PR #36302 changed the heatmap data structure to use axis indices for proper sorting, but the tooltip formatter was not updated to look up the actual values from the sorted arrays.
Changes:
sortedXAxisValuesandsortedYAxisValuesarrays using the indicesnormalizeAcrossis enabled to use actual values instead of indices as lookup keysBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before: Tooltip shows

0 (1)or similar numeric indicesAfter: Tooltip shows actual axis labels like

Mon (Morning)TESTING INSTRUCTIONS
normalizeAcross= 'x', 'y', or 'heatmap') - tooltips should still show correct valuesADDITIONAL INFORMATION
🤖 Generated with Claude Code