Skip to content

Commit

Permalink
Added docstring and fixed trailing slash on NdWidget.json_load_path
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Feb 11, 2016
1 parent cd067fb commit a6925d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion holoviews/plotting/widgets/__init__.py
Expand Up @@ -85,7 +85,10 @@ class NdWidget(param.Parameterized):

json_load_path = param.String(default=None, doc="""
If export_json is enabled the widget JS code will load the data
from this relative path, if None defaults to json_save_path.""")
from this path, if None defaults to json_save_path. For loading
the data from within the notebook the path must be relative,
when exporting the notebook the path can be set to another
location like a webserver where the json files can be uploaded to.""")

##############################
# Javascript include options #
Expand Down Expand Up @@ -146,6 +149,7 @@ def _get_data(self):
mode = repr(self.renderer.mode)
json_path = (self.json_save_path if self.json_load_path is None
else self.json_load_path)
json_path = (json_path + '/') if json_path[-1] != '/' else json_path
dynamic = repr(self.plot.dynamic) if self.plot.dynamic else 'false'
return dict(CDN=CDN, frames=self.get_frames(), delay=delay,
cached=cached, load_json=load_json, mode=mode, id=self.id,
Expand Down

0 comments on commit a6925d2

Please sign in to comment.