Skip to content

Commit

Permalink
Fixes incorrect date type inference in #6432. (#6433)
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie Newey authored and scottdraves committed Dec 4, 2017
1 parent e5a14a6 commit 29a69a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion beakerx/beakerx/tabledisplay/tabledisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def convert_type(object_type, value):
return "integer"
if object_type == "uint64":
return "int64"
if is_date(value):
if object_type.startswith("datetime64"):
return "time"
if isinstance(value, str):
return "string"
Expand Down
12 changes: 6 additions & 6 deletions beakerx/beakerx/tabledisplay/tableitems.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ class ColumnType(Enum):

class DateType:
type = "Date"

def __init__(self, value):
self.timestamp = parse(value).timestamp() * 1000
self.timestamp = parse(str(value)).timestamp() * 1000


class DataBarsRenderer:
type = "DataBars"
includeText = True

def __init__(self, x):
self.includeText = x

Expand All @@ -60,7 +60,7 @@ class DecimalStringFormat:
type = "decimal"
minDecimals = 4
maxDecimals = 4

def __init__(self, min=4, max=4):
self.minDecimals = min
self.maxDecimals = max
Expand Down Expand Up @@ -96,8 +96,8 @@ class TableDisplayCellHighlighter:
FULL_ROW = HighlightStyle.FULL_ROW
SINGLE_COLUMN = HighlightStyle.SINGLE_COLUMN
defaultStyle = HighlightStyle.FULL_ROW

@staticmethod
def getHeatmapHighlighter(colName, style=defaultStyle, minVal=None, maxVal=None, minColor=None, maxColor=None):
return HeatmapHighlighter (colName, style, minVal, maxVal, minColor, maxColor)

0 comments on commit 29a69a5

Please sign in to comment.