Skip to content
Open
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
6 changes: 5 additions & 1 deletion holoviews/plotting/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,6 @@ def save(self_or_cls, obj, basename, fmt='auto', key={}, info={},

with StoreOptions.options(obj, options, **kwargs):
plot, fmt = self_or_cls._validate(obj, fmt)

if isinstance(plot, Viewable):
from bokeh.resources import CDN, INLINE, Resources
if isinstance(resources, Resources):
Expand All @@ -529,6 +528,11 @@ def save(self_or_cls, obj, basename, fmt='auto', key={}, info={},
resources = CDN
elif resources.lower() == 'inline':
resources = INLINE
if fmt not in ["html", "png", "auto"]:
raise ValueError("Format for exporting panel not supported: %s" % fmt)
fmt = 'html' if fmt == 'auto' else fmt
if basename.split('.')[-1] not in ('html', 'png'):
basename = "%s.%s" % (basename, fmt)
plot.layout.save(basename, embed=True, resources=resources)
return

Expand Down