Exemple #1
0
 def _repr_html_(self):
     """ 渲染配置项并将图形显示在 notebook 中
     """
     _tmp = 'notebook.html'
     dom = self._render_notebook_dom_()
     component = self._render_notebook_component_()
     tmp = template.JINJA2_ENV.get_template(_tmp)
     require_config = template.produce_require_configuration(
         self._js_dependencies, self._jshost)
     html = tmp.render(single_chart=component, dom=dom, **require_config)
     return html
Exemple #2
0
    def _repr_html_(self):
        """ Render the options dict, displayed in the jupyter notebook

        :return:
        """
        _tmp = 'notebook.html'
        dom = self._render_notebook_dom_()
        component = self._render_notebook_component_()
        tmp = template.JINJA2_ENV.get_template(_tmp)
        require_config = template.produce_require_configuration(
            self._js_dependencies, self._jshost)
        html = tmp.render(single_chart=component, dom=dom, **require_config)
        return html
Exemple #3
0
    def _repr_html_(self):
        """

        :return:
        """
        _tmp = "notebook.html"
        doms = ""
        components = ""
        dependencies = self._merge_dependencies()
        for chart in self.__charts:
            doms += chart._render_notebook_dom_()
            components += chart._render_notebook_component_()

        require_config = produce_require_configuration(dependencies,
                                                       self._jshost)
        tmp = template.JINJA2_ENV.get_template(_tmp)
        html = tmp.render(single_chart=components, dom=doms, **require_config)
        return html