Skip to content

Commit

Permalink
Merge pull request #1094 from ioam/heatmap_position_stream
Browse files Browse the repository at this point in the history
Allow PositionX/Y/XY streams to work with categorical axes
  • Loading branch information
jlstevens authored Jan 31, 2017
2 parents 79422b9 + 12ccdbd commit 7041e28
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions holoviews/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""

import param
from numbers import Number
from collections import defaultdict
from .core import util

Expand Down Expand Up @@ -199,7 +200,7 @@ class PositionX(Stream):
position of the mouse/trackpad cursor.
"""

x = param.Number(default=0, doc="""
x = param.ClassSelector(class_=(Number, util.basestring), default=0, doc="""
Position along the x-axis in data coordinates""", constant=True)


Expand All @@ -211,7 +212,7 @@ class PositionY(Stream):
position of the mouse/trackpad cursor.
"""

y = param.Number(default=0, doc="""
y = param.ClassSelector(class_=(Number, util.basestring), default=0, doc="""
Position along the y-axis in data coordinates""", constant=True)


Expand All @@ -223,10 +224,10 @@ class PositionXY(Stream):
position of the mouse/trackpad cursor.
"""

x = param.Number(default=0, doc="""
x = param.ClassSelector(class_=(Number, util.basestring), default=0, doc="""
Position along the x-axis in data coordinates""", constant=True)

y = param.Number(default=0, doc="""
y = param.ClassSelector(class_=(Number, util.basestring), default=0, doc="""
Position along the y-axis in data coordinates""", constant=True)


Expand Down

0 comments on commit 7041e28

Please sign in to comment.