Get the html for a chart and store it

def stack(self, slug, chart_obj=None, title=None):
        """
        Get the html for a chart and store it
        """
        if chart_obj is None:
            if self.chart_obj is None:
                self.err(
                    self.stack,
                    "No chart object set: please provide one in parameters")
                return
            chart_obj = self.chart_obj
        try:
            seaborn_chart = None
            if self.engine == "chartjs":
                html = chart_obj
            elif self.engine == "seaborn":
                html = ""
                seaborn_chart = chart_obj
            else:
                html = self.get_html(chart_obj, slug)
            if html is None and seaborn_chart is None:
                self.err(
                    self.stack, "Can not stack: empty html reveived for " +
                    str(chart_obj), "-", slug)
                return
            report = dict(slug=slug, html=html)
            if seaborn_chart is not None:
                report["seaborn_chart"] = seaborn_chart
            if self.engine not in self.report_engines:
                self.report_engines.append(self.engine)
            self.reports.append(report)
        except Exception as e:
            self.err(e, self.stack, "Can not stack report")
            return
        self.ok("Stacked report", slug)