Skip to content

Commit

Permalink
Miscellaneous stream fixes (#2256)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Feb 9, 2018
1 parent 8af9c49 commit 190d943
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
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 @@ -506,6 +506,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

0 comments on commit 190d943

Please sign in to comment.