Skip to content
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

fix vectorfield hover #6258

Merged
merged 8 commits into from
Jun 6, 2024
Merged

fix vectorfield hover #6258

merged 8 commits into from
Jun 6, 2024

Conversation

ahuang11
Copy link
Collaborator

@ahuang11 ahuang11 commented Jun 4, 2024

import numpy as np
import holoviews as hv

hv.extension("bokeh")

hv.VectorField(
    ([-1, 0, 1, 2, 3], [-1, 0, 1, 2, 3], np.deg2rad([0, 45, 90, 180, 360]))
).opts(tools=["hover"])

Not sure there's a better solution, but I think it's better than no solution because hover is useful:

image

Closes #3785

@ahuang11 ahuang11 requested a review from hoxbro June 4, 2024 19:21
@hoxbro
Copy link
Member

hoxbro commented Jun 4, 2024

I'm not a fan of this solution. The main reason is you increase the data by a factor of 4.

If we choose to go this way, we should at least limit this only to be done when we have an actual hover tool. By the looks of it, you send all the data to the front end no matter what.

Copy link

codecov bot commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.51%. Comparing base (2ba3d78) to head (7e87fcb).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6258      +/-   ##
==========================================
+ Coverage   88.39%   88.51%   +0.12%     
==========================================
  Files         323      323              
  Lines       67620    67659      +39     
==========================================
+ Hits        59770    59887     +117     
+ Misses       7850     7772      -78     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hoxbro
Copy link
Member

hoxbro commented Jun 5, 2024

Maybe add two tests that check that hover information is sent to the front end if hover is enabled and one that checks it is not if hover is not enabled.

@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Jun 6, 2024
@hoxbro hoxbro merged commit 17cc894 into main Jun 6, 2024
14 of 15 checks passed
@hoxbro hoxbro deleted the vectorfield_hover branch June 6, 2024 12:07
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vectorfield broken hover tooltips
3 participants