Changing CDSView filters' attributes does not trigger rendering
See original GitHub issueBokeh 0.12.11
from bokeh.io import curdoc
from bokeh.layouts import column
from bokeh.models import CDSView, IndexFilter, ColumnDataSource, Button
from bokeh.plotting import figure
ds = ColumnDataSource(dict(x=[1, 2, 3], y=[1, 2, 3]))
f = IndexFilter(indices=list(range(len(ds.data['x']))))
v = CDSView(source=ds, filters=[f])
fig = figure()
fig.x(x='x', y='y', source=ds, view=v)
b = Button(label='Change indices')
def change_indices():
if f.indices:
f.indices = f.indices[:-1]
b.on_click(change_indices)
curdoc().add_root(column(fig, b))
Clicking on the button results in ModelChanged
messages being sent out, but the plot itself does not change.
The root cause is that all filter models do not connect any signals - effectively, they’re just passive containers.
As of now, a workaround would be to re-set filters
property of the CDSView
instance.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:16 (15 by maintainers)
Top Results From Across the Web
Changing CDSView filters' attributes does not trigger rendering
Changing CDSView filters' attributes does not trigger rendering. ... The root cause is that all filter models do not connect any signals ......
Read more >In Bokeh Server, CDSView Is Updating But Glyph Does Not
I expected the glyph that uses this view to change as well, ... Changing CDSView filters' attributes does not trigger rendering · Issue ......
Read more >python 3.x - Creating GlyphRenderers for modifying the legend
I want to create a bokeh application that can filter points based on some attribute. Here is a very simple code example for...
Read more >bokeh Changelog - pyup.io
11413 [component: bokehjs] Changing tile provider does not remove attribution - 11437 [component: bokehjs] [BUG] HoverTool ignores IndexFilter in CDSView
Read more >SAP - ABAP RESTful Application Programming Model
CDS Views with parameters do not work properly in Fiori Elements UI services. The filter value is not sent to the backend.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just ran into this too when trying to update an IndexFilter. Was extremely confusing.
agree this is an issue of missing plumbing, which might be simple to add
cc @clairetang6