Skip to content

Commit

Permalink
Ensure max_cycles persists on style for non-batched plots
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Apr 13, 2017
1 parent 046b9f1 commit a8a6f3a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion holoviews/plotting/bokeh/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,9 @@ def update_frame(self, key, ranges=None, plot=None, element=None):
self.current_key = key
self.current_frame = element

self.style = self.lookup_options(element, 'style')
max_cycles = len(self.style._options)
self.style = self.lookup_options(style_element, 'style').max_cycles(max_cycles)

self.set_param(**self.lookup_options(element, 'plot').options)
ranges = self.compute_ranges(self.hmap, key, ranges)
ranges = match_spec(element, ranges)
Expand Down
10 changes: 8 additions & 2 deletions holoviews/plotting/bokeh/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,8 +772,14 @@ def update_frame(self, key, ranges=None, plot=None, element=None, empty=False):
if not element or (not self.dynamic and self.static):
return

style_element = element.last if self.batched else element
self.style = self.lookup_options(style_element, 'style')
if self.batched:
style_element = element.last
max_cycles = None
else:
style_element = element
max_cycles = len(self.style._options)
style = self.lookup_options(style_element, 'style')
self.style = style.max_cycles(max_cycles) if max_cycles else style

ranges = self.compute_ranges(self.hmap, key, ranges)
self.set_param(**self.lookup_options(style_element, 'plot').options)
Expand Down

0 comments on commit a8a6f3a

Please sign in to comment.