Skip to content

Fix tooltip visibility and expand color palette (fixes #196)#277

Merged
emeryberger merged 1 commit intomasterfrom
colors_plus_tooltips
Mar 28, 2026
Merged

Fix tooltip visibility and expand color palette (fixes #196)#277
emeryberger merged 1 commit intomasterfrom
colors_plus_tooltips

Conversation

@emeryberger
Copy link
Copy Markdown
Member

Summary

  • Expand color palette from 4/5 to 8 colors — legend icons used % 4 and plot series used % 5, but CSS defines 8 distinct series colors. Both now use % 8 so all colors (indigo, emerald, rose, amber, violet, cyan, pink, lime) are utilized.
  • Add progress point name to tooltip — hovering a data point now shows which progress point it belongs to, not just the speedup values.
  • Fix tooltip positioning — tooltips were rendered off-screen when progress point paths were long (e.g. /Users/.../linear_regression-pthread.c:86 made the tooltip 590px wide). Fixed by: passing the SVG circle element directly to d3-tip (tip.show(d, this) instead of tip.show(d, i)), truncating paths to just filename:line in the tooltip, and adding max-width: 320px with word-wrap as a safety net.

Closes #196

Test plan

  • Selenium test confirms all circles show tooltip on hover with opacity=1, within viewport
  • Tooltip content shows "Progress Point: linear_regression-pthread.c:86" (filename only, not full path)
  • Tooltip width is 297px (was 590px before), fits within plot area
  • Verified with both sqlite.coz (many plots, 1 progress point) and linear_regression profile (4 data points, long path)

🤖 Generated with Claude Code

Copy link
Copy Markdown
Contributor

@ebkalderon ebkalderon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work pretty well! Tested locally on a Rust application with 11 progress points, and the UI looks much clearer. I'm especially happy to see the in-tooltip filenames originally from #169 have returned. Thanks for addressing this, @emeryberger. 🎉

@emeryberger emeryberger merged commit 67e90c3 into master Mar 28, 2026
2 checks passed
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.

Profile viewer has an extremely limited color palette

2 participants