update Notebook-user-cases
@@ -10,12 +10,22 @@ class Page(object):
self.__charts = []
def add(self, achart_or_charts):
+ """
+
+ :param achart_or_charts:
+ :return:
+ """
if isinstance(achart_or_charts, list):
self.__charts.extend(achart_or_charts)
else:
self.__charts.append(achart_or_charts)
def render(self, path="render.html"):
+ """
+
+ :param path:
+ :return:
+ """
template_name = "multicharts.html"
chart_content = self.render_embed()
tmp = template.JINJA2_ENV.get_template(template_name)
@@ -24,6 +34,10 @@ class Page(object):
template.write_utf8_html_file(path, html)
def render_embed(self):
+ """
+
+ :return:
+ """
chart_content = ""
for chart in self.__charts:
chart_content += chart.render_embed()
