Comments (6)
Since bokeh 3.4 the default for tap tool is xor
mode. It may appear to look like the tool is in append
mode, but in append
mode the user can only add selected data points, but not remove them, which the main benefit of xor
mode. We switched to xor
default, because users wanted to be able to deselect points and especially toggle data points.
The case from discourse the prompted this discussion silently assumes replace
mode, which now requires explicit specification. The best way, that works with all modes, would be to keep track of selected data points and perform actions only for newly selected data points. Currently there is no built-in functionality for this.
from bokeh.
cc @bokeh/dev I think this change should be re-visited. It certainly makes sense to offer this mode for some niche cases, but I don't think it makes sense as the default (and it clearly defies some user's expectations as well as seen on the discourse). This is especially jarring in plots like pie or bar charts where there are only a handful of elements to select. This also puts one tool on different footing than all other tools which is not good for simple documentation. Many users have used tap selection as part of a larger UI, e.g. to trigger some other drill down or other UI update and this change breaks all of those usages.
from bokeh.
FWIW I would be ok with this default behavior:
- tapping new points replaces the existing selection (previous behavior)
- tapping an already selected point unselects it (new behavior)
i.e. it is very specifically the "additive" nature of this xor-mode, where tapping a new point adds to an existing selection, that is the problem
from bokeh.
I agree with that proposal. Let's allow deselect but not adding by default.
from bokeh.
Do we want this behavior to be implemented in place of replace
mode (just for tap tool) or should I introduce a new mode?
from bokeh.
I actually don't know what all the current modes are to say, where are they enumerated/described?
Well, I guess they are listed here
SelectionMode = Enumeration(replace, append, intersect, subtract, xor)
I guess it's a little weird, I don't think one set of selection modes really neatly covers all the tools in the same way. i.e the re-select to un-select that can make sense for a tap is nearly impossible to imagine being useful on a lasso tool. I think I lean towards: new mode, e.g. replace-foo
with that being the default for tap. That's in the interest of not having "replace" mean multiple things, but also being able to say "a replace mode" is the default for all tools, which is less awkward to explain. But I am interested in others' thoughts.
from bokeh.
Related Issues (20)
- Refdocs anchors do not work HOT 2
- [BUG] 3.4.0: Selection glyph no longer employs selection_glyph properties HOT 2
- `InputWidget.title` doesn't update anymore HOT 1
- [BUG] Switching order of children in layout has no effect
- [BUG] SaveTool generates smaller image than plot (especially in gridplot) in BokehJs
- [BUG] Bokeh doesn't support IPv6 websocket origins HOT 4
- [BUG] Can't set reuse_port in bokeh.server.util bind_sockets HOT 2
- Re-organize API reference docs to be one page per class HOT 9
- [BUG] Cannot `micropip.install("bokeh>=3.4.0")` HOT 8
- activate pydata-sphinx-theme version banner
- Build job failing due to version mismatch HOT 3
- [BUG] Lack of range expansion when there remains unbounded directions, even when `maintain_focus=False`
- [FEATURE] HOT 1
- [FEATURE] Support range bounds for categorical axis HOT 2
- bokehjs' build fails on Windows with no explanation
- [FEATURE] NumPy 2.0 support HOT 5
- Image blur example is unusably slow
- Faces example draws box in incorrect location
- [BUG] Using array/list in line_dash for hspan doesn't work HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bokeh.