Add a chart to the layout.

def add_chart(self, component):
        """Add a chart to the layout."""
        if getattr(component, "name") != "Chart":
            raise Exception("Component is not an instance of Chart")
        self.charts.append(component)