def change_type(self, cls):
        """
        Change type of diagram in this chart.

        Accepts one of classes which extend Diagram.
        """
        target_type = cls._type
        target = self._embedded.createInstance(target_type)
        self._embedded.setDiagram(target)
        return cls(target)
Change type of diagram in this chart.

        Accepts one of classes which extend Diagram.