(cls, chart_class)
Registers a chart class.

        The chart classes are identified by their lower case name.

        Args:
            chart_class (type): the chart class to register.

        Raises:
            KeyError: if class is already set for the corresponding name.
Registers a chart class.
Registers a chart class .
def register_chart(cls, chart_class):
        """Registers a chart class.

        The chart classes are identified by their lower case name.

        Args:
            chart_class (type): the chart class to register.

        Raises:
            KeyError: if class is already set for the corresponding name.
        """
        chart_name = chart_class.NAME.lower()
        if chart_name in cls._class_registry:
            raise KeyError('Class already set for name: {0:s}.'.format(
                chart_class.NAME))
        cls._class_registry[chart_name] = chart_class
def register_chart ( cls , chart_class ) : chart_name = chart_class . NAME . lower ( ) if chart_name in cls . _class_registry : raise KeyError ( 'Class already set for name: {0:s}.' . format ( chart_class . NAME ) ) cls . _class_registry [ chart_name ] = chart_class