def _repr_html_(self):
        """Build the HTML representation for IPython."""
        self.chart_id = '_'.join(['bearcart', uuid4().hex])
        self.template_vars.update({'chart_id': self.chart_id,
                                   'y_axis_id': self.y_axis_id,
                                   'legend_id': self.legend_id,
                                   'slider_id': self.slider_id,
                                   'export_json': json.dumps(self.json_data)})

        self._build_graph()
        html = self.env.get_template('ipynb_repr.html')
        return html.render(self.template_vars)
Build the HTML representation for IPython.