DOC: a few minor api docstring updates
@@ -255,6 +255,7 @@ class TopLevelMixin(mixins.ConfigMethodMixin):
self.data = core.UrlData(self.data)
def to_dict(self, *args, **kwargs):
+ """Convert the chart to a dictionary suitable for JSON export"""
copy = self.copy()
original_data = getattr(copy, 'data', Undefined)
copy._prepare_data()
@@ -311,7 +312,6 @@ class TopLevelMixin(mixins.ConfigMethodMixin):
Additional keyword arguments are passed to the output method
associated with the specified format.
"""
-
if isinstance(fp, six.string_types):
format = fp.split('.')[-1]
@@ -381,7 +381,10 @@ class TopLevelMixin(mixins.ConfigMethodMixin):
return RepeatChart(spec=self, repeat=repeat, **kwargs)
def properties(self, **kwargs):
- """Set top-level properties of the Chart."""
+ """Set top-level properties of the Chart.
+
+ Argument names and types are the same as class initialization.
+ """
copy = self.copy(deep=True, ignore=['data'])
for key, val in kwargs.items():
setattr(copy, key, val)
