Пример #1
0
    def _serie_format(self, serie, value):
        """Format an independent value for the serie"""

        kwargs = {'chart': self, 'serie': serie, 'index': None}
        formatter = (serie.formatter or self.formatter or self._value_format)
        kwargs = filter_kwargs(formatter, kwargs)
        return formatter(value, **kwargs)
Пример #2
0
    def _serie_format(self, serie, value):
        """Format an independent value for the serie"""

        kwargs = {'chart': self, 'serie': serie, 'index': None}
        formatter = (serie.formatter or self.formatter or self._value_format)
        kwargs = filter_kwargs(formatter, kwargs)
        return formatter(value, **kwargs)
Пример #3
0
    def _format(self, serie, i):
        """Format the nth value for the serie"""
        value = serie.values[i]
        metadata = serie.metadata.get(i)

        kwargs = {'chart': self, 'serie': serie, 'index': i}
        formatter = ((metadata and metadata.get('formatter'))
                     or serie.formatter or self.formatter
                     or self._value_format)
        kwargs = filter_kwargs(formatter, kwargs)
        return formatter(value, **kwargs)
Пример #4
0
    def _format(self, serie, i):
        """Format the nth value for the serie"""
        value = serie.values[i]
        metadata = serie.metadata.get(i)

        kwargs = {'chart': self, 'serie': serie, 'index': i}
        formatter = ((metadata and metadata.get('formatter'))
                     or serie.formatter or self.formatter
                     or self._value_format)
        kwargs = filter_kwargs(formatter, kwargs)
        return formatter(value, **kwargs)