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

Miscellaneous stream fixes #2256

Merged
merged 3 commits into from
Jan 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions holoviews/plotting/bokeh/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ def __init__(self, plot, streams, source, **params):
except AttributeError:
self.comm = Comm(plot)
self.source = source
self.reset()


def reset(self):
self.handle_ids = defaultdict(dict)
self.callbacks = []
self.plot_handles = {}
Expand Down
2 changes: 2 additions & 0 deletions holoviews/plotting/bokeh/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,8 @@ def get_data(self, element, ranges, style):

class AreaPlot(SpreadPlot):

_stream_data = False # Plot does not support streaming data

def get_extents(self, element, ranges):
vdims = element.vdims
vdim = vdims[0].name
Expand Down
3 changes: 3 additions & 0 deletions holoviews/plotting/bokeh/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ def sync_sources(self):
else:
renderer.update(source=new_source)
plot.handles['source'] = new_source
for callback in plot.callbacks:
callback.reset()
callback.initialize()
shared_sources.append(new_source)
source_cols[id(new_source)] = [c for c in new_source.data]
self.handles['shared_sources'] = shared_sources
Expand Down
3 changes: 3 additions & 0 deletions holoviews/plotting/bokeh/tabular.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ def initialize_plot(self, ranges=None, plot=None, plots=None, source=None):
self._execute_hooks(element)
self.drawn = True

for cb in self.callbacks:
cb.initialize()

return table


Expand Down