-
-
Notifications
You must be signed in to change notification settings - Fork 114
fix: exclude internal style cols from tooltips #1690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
maximlt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!!!
| expected = altered_df.hvplot.scatter('x', 'y', c='_color') | ||
| self.assertEqual(actual, expected) | ||
|
|
||
| def test_color_series_excluded_from_default_hover(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the tests to Charts1D, next to the other _color test (see above). In addition, having scatter plots in Charts1D wasn't appropriate, as this is a 1D chart (2D are points, paths, etc.).
hvplot/tests/testcharts.py
Outdated
| plot, element(self.cat_df.reset_index(), ['x', 'y'], ['index', 'category']) | ||
| ) | ||
|
|
||
| # Skip Series.map() tests as they don't work with Dask |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've re-enabled the dask tests. This showed that hvPlot doesn't support color=<lazy_dask_series_thing>. The comments didn't make it very clear to me what the root cause was for skipping them.
fixes #391
This PR:
Fixes hover tooltips showing confusing internal
_colorand_sizefields when passing mapped Series to color/size parameters. The fix automatically excludes these internal columns from default hover tooltips while respecting explicithover_tooltipsconfigurations.Documentation updated to recommend using
color='column'+cmap={...}for custom color mapping.Added tests
Examples