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
[BUG] BoxAnnotation doesn't respect fill_color=None #9877
Comments
Right, it's currently not explicitly checking for Since it should be a simple fix and since there a a workaround I will leave it for now a |
We can then assume when fill_color = None, fill_alpha should be set to zero then? |
No, |
Both the lines and the background should not be rendered then or just the background (which happens if fill_alpha = 0)? |
Line and fill visuals should be considered independently, the same way as glyphs work. Essentially you have to replace: this.visuals.fill.set_vectorize(ctx, i)
ctx.fill() with if (this.visuals.fill.doit) {
this.visuals.fill.set_vectorize(ctx, i)
ctx.fill()
} and similarly change The tricky bit is that annotations have both canvas and CSS modes. This code only handles to former and you will have to figure out the later. |
Ok, thanks for the feedback! Fixing that on the PR! |
#9886) * Issue #9877, if fill_color = None, the box should not be rendered * Removed unrelated ongoing code * Removed unecessary spaces in visuals.ts. The file is now the same as the original * Fixed fill_color = None behavior to match the expected one as mentioned in Issue#9886 by matt * Removed unecessary spacing * Fixes * Version ts reversed * Version.ts shouldnt be here * Revert package-lock.json.. * Removed trailing spaces * line_color = None -> line is not rendered
ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)
Bokeh 2.0.0 | Python 3.7 | Firefox 74.0 | Windows 10 build 16299.1747
Description of expected behavior and the observed behavior
Expected behavior: Glyphs generally support turning off fill by supplying a
fill_color
value ofNone
. Would expect the same fromBoxAnnotation
.Observed behavior:
BoxAnnotation
(and maybe others? haven't tested) instead appears to have a white fill with a low (but nonzero) alpha under these conditions. Settingfill_alpha
to zero has the desired effect, but this is not my standard usage pattern for turning off fill, and it should probably be consistent anyway.Complete, minimal, self-contained example code that reproduces the issue
Screenshots or screencasts of the bug in action
The
BoxAnnotation
is drawn between the centers of the red circles. Notice the "notches" of paler red where the box intersects them.The text was updated successfully, but these errors were encountered: