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

Split all value dimensions when splitting by path color #2990

Merged
merged 11 commits into from
Sep 13, 2018

Conversation

philippjfr
Copy link
Member

When displaying a path with a varying value dimension used to color each line segment the path is split into little chunks. However previously other value dimensions would not be split in this way which would cause several issues:

  1. When enabling hover on the path the CDS would end up with mismatched shapes
  2. When enabling a drawing tool on the path the CDS would also end up with mismatching shapes

The solution is to split all value dimensions by default.

@philippjfr philippjfr added type: bug Something isn't correct or isn't working tag: backend: bokeh labels Sep 7, 2018
@philippjfr
Copy link
Member Author

@jlstevens Ready to review and once merged a dev release would be helpful.

if clmin == clmax:
idx = np.argmin(np.abs(np.array(levels)-clmin))
clip = levels[idx: idx+2] if len(levels) > idx+2 else levels[idx-1: idx+1]
return cmap, clip
Copy link
Contributor

Choose a reason for hiding this comment

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

Now the return value has changed (or at least now includes clip) it might be worth updating the docstring...

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, done.

@jlstevens
Copy link
Contributor

This change makes a lot of sense. Other than one minor comment to address, I am happy to merge.

@jlstevens
Copy link
Contributor

Looks good to me.

@jlstevens jlstevens merged commit d924a55 into master Sep 13, 2018
@philippjfr philippjfr deleted the path_split_vdims branch November 12, 2018 18:01
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 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tag: backend: bokeh type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants