Skip to content

Commit

Permalink
Allow PositionX/Y/XY to work with categorical axes
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jan 31, 2017
1 parent 6a08b6b commit 12ccdbd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions holoviews/streams.py
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 12ccdbd

Please sign in to comment.