From a8a6f3a4be10525172347b4bd80c9b4e0ab76dc6 Mon Sep 17 00:00:00 2001
From: Philipp Rudiger
Date: Thu, 13 Apr 2017 18:59:31 +0100
Subject: [PATCH] Ensure max_cycles persists on style for non-batched plots
---
holoviews/plotting/bokeh/chart.py | 4 +++-
holoviews/plotting/bokeh/element.py | 10 ++++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/holoviews/plotting/bokeh/chart.py b/holoviews/plotting/bokeh/chart.py
index b7c2d63246..6194b7ada6 100644
--- a/holoviews/plotting/bokeh/chart.py
+++ b/holoviews/plotting/bokeh/chart.py
@@ -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)
diff --git a/holoviews/plotting/bokeh/element.py b/holoviews/plotting/bokeh/element.py
index edc9a0a502..e084cd1839 100644
--- a/holoviews/plotting/bokeh/element.py
+++ b/holoviews/plotting/bokeh/element.py
@@ -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)