Skip to content

Commit

Permalink
Applying dimension formatter in Table cell_value
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Mar 22, 2015

Verified

This commit was signed with the committer’s verified signature. The key has expired.
addaleax Anna Henningsen
1 parent 8389d07 commit 588bc2a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions holoviews/element/tabular.py
Original file line number Diff line number Diff line change
@@ -106,8 +106,9 @@ def cell_value(self, row, col):
elif col == 0:
return str(self.dimensions('value')[row])
else:
dim = self.get_dimension(row)
heading = self._cached_value_names[row]
return self.data.get(heading, np.NaN)
return dim.pprint_value(self.data.get(heading, np.NaN))


def hist(self, *args, **kwargs):
@@ -188,11 +189,14 @@ def cell_value(self, row, col):
return str(self.value_dimensions[col - ndims])
return str(self.key_dimensions[col])
else:
dim = self.get_dimension(col)
if col >= ndims:
row_values = self.values()[row-1]
return row_values[col - ndims]
row_data = list(self.data.keys())[row-1]
return row_data[col]
val = row_values[col - ndims]
else:
row_data = list(self.data.keys())[row-1]
val = row_data[col]
return dim.pprint_value(val)


def cell_type(self, row, col):

0 comments on commit 588bc2a

Please sign in to comment.