Skip to content

Commit

Permalink
NdMapping.label looks at first element instead of iterating recursively
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Dec 15, 2015
1 parent d4cdafd commit 3f02d8f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions holoviews/core/ndmapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

from . import traversal, util
from .dimension import OrderedDict, Dimension, Dimensioned, ViewableElement
from .util import unique_iterator, sanitize_identifier, dimension_sort, group_select, iterative_select, basestring, wrap_tuple, process_ellipses
from .util import (unique_iterator, sanitize_identifier, dimension_sort,
basestring, wrap_tuple, process_ellipses)


class item_check(object):
Expand Down Expand Up @@ -778,10 +779,8 @@ def label(self):
if self._label:
return self._label
else:
labels = {v.label for v in self.values()
if not v._auxiliary_component}
if len(labels) == 1:
return list(labels)[0]
if len(self):
return next(iter(self.data)).label
else:
return ''

Expand Down

0 comments on commit 3f02d8f

Please sign in to comment.