bokeh.models.NumberFormatter

Here are the examples of the python api bokeh.models.NumberFormatter taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

3 Source : datatable.py
with GNU General Public License v3.0
from happydasch

    def _get_formatter(self, ctype):
        if ctype == ColummDataType.FLOAT:
            return NumberFormatter(format=self._scheme.number_format)
        elif ctype == ColummDataType.INT:
            return NumberFormatter()
        elif ctype == ColummDataType.DATETIME:
            return DateFormatter(format='%c')
        elif ctype == ColummDataType.STRING:
            return StringFormatter()
        elif ctype == ColummDataType.PERCENTAGE:
            return NumberFormatter(format='0.000 %')
        else:
            raise Exception(f'Unsupported ColumnDataType: "{ctype}"')

    def get_tables(self, analyzer):