Skip to content

Conversation

@Azaya89
Copy link
Collaborator

@Azaya89 Azaya89 commented Nov 6, 2025

fixes #391

This PR:

  • Fixes hover tooltips showing confusing internal _color and _size fields when passing mapped Series to color/size parameters. The fix automatically excludes these internal columns from default hover tooltips while respecting explicit hover_tooltips configurations.

  • Documentation updated to recommend using color='column' + cmap={...} for custom color mapping.

  • Added tests

Examples

  1. From Issue Specifying color adds _color entry hover-over #391
import hvplot.pandas

penguins = hvplot.sampledata.penguins('pandas')
penguins.hvplot.scatter(
    x="bill_length_mm",
    y="bill_depth_mm",
    color=penguins["species"].map({
        "Adelie":"blue",
        "Gentoo":"yellow",
        "Chinstrap":"red",
    }),
)
Screenshot 2025-11-06 at 3 40 48 PM
  1. Recommended approach
import hvplot.pandas

penguins = hvplot.sampledata.penguins('pandas')
penguins.hvplot.scatter(
    x="bill_length_mm",
    y="bill_depth_mm",
    color='species',
    cmap={
        "Adelie":"blue",
        "Gentoo":"yellow",
        "Chinstrap":"red",
    },
)
Screenshot 2025-11-06 at 3 42 34 PM

@Azaya89 Azaya89 requested a review from maximlt November 6, 2025 15:15
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.

Specifying color adds _color entry hover-over

2 participants