From 23b50de0f702cdfe60e489a41bd5ab7a7c5eff68 Mon Sep 17 00:00:00 2001
From: Philipp Rudiger
Date: Tue, 23 Jan 2018 04:09:36 +0000
Subject: [PATCH] Small fixes for bokeh table formatting
---
holoviews/plotting/bokeh/tabular.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/holoviews/plotting/bokeh/tabular.py b/holoviews/plotting/bokeh/tabular.py
index a566ec466a..4cbbdfef9d 100644
--- a/holoviews/plotting/bokeh/tabular.py
+++ b/holoviews/plotting/bokeh/tabular.py
@@ -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
@@ -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()