Skip to content

Commit

Permalink
Small fixes for bokeh table formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jan 23, 2018
1 parent b4b37f1 commit 23b50de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions holoviews/plotting/bokeh/tabular.py
Expand Up @@ -2,7 +2,7 @@

from bokeh.models.widgets import (
DataTable, TableColumn, NumberEditor, NumberFormatter, DateFormatter,
TimeEditor, StringFormatter, IntEditor
TimeEditor, StringFormatter, StringEditor, IntEditor
)

from ...core import Dataset, Dimension
Expand Down Expand Up @@ -79,12 +79,12 @@ def initialize_plot(self, ranges=None, plot=None, plots=None, source=None):
formatter = NumberFormatter()
editor = IntEditor()
elif kind == 'f':
formatter = NumberFormatter(format='0,0[.]000000')
formatter = NumberFormatter(format='0,0.0[00000]')
editor = NumberEditor()
elif kind == 'M' or (kind == 'O' and type(data[col][0]) in datetime_types):
dimtype = element.get_dimension_type(0)
Dimension.type_formatters.get(dimtype, '%Y-%m-%d %H:%M:%S')
formatter = DateFormatter()
dformat = Dimension.type_formatters.get(dimtype, '%Y-%m-%d %H:%M:%S')
formatter = DateFormatter(format=dformat)
editor = TimeEditor()
else:
formatter = StringFormatter()
Expand Down

0 comments on commit 23b50de

Please sign in to comment.