Skip to content

Commit

Permalink
Merge pull request #1205 from ioam/dim_label_fixes
Browse files Browse the repository at this point in the history
Dimension label fixes
  • Loading branch information
jlstevens authored Mar 13, 2017
2 parents 8484dca + 44d2f4d commit 09e467f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions holoviews/core/dimension.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ def pprint_value_string(self, value):
title_format variable, including the unit string (if
set). Numeric types are printed to the stated rounding level.
"""
unit = '' if self.unit is None else ' ' + self.unit
unit = '' if self.unit is None else ' ' + safe_unicode(self.unit)
value = self.pprint_value(value)
return title_format.format(name=self.label, val=value, unit=unit)
return title_format.format(name=safe_unicode(self.label), val=value, unit=unit)


def __hash__(self):
Expand Down
2 changes: 1 addition & 1 deletion holoviews/plotting/widgets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def get_widgets(self):
next_vals = escape_dict({k: escape_vals(v) for k, v in next_vals.items()})

visibility = '' if visible else 'display: none'
dim_str = safe_unicode(dim.name)
dim_str = dim.pprint_label
escaped_dim = dimension_sanitizer(dim_str)
widget_data = dict(dim=escaped_dim, dim_label=dim_str,
dim_idx=idx, vals=dim_vals, type=widget_type,
Expand Down

0 comments on commit 09e467f

Please sign in to comment.