Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using {x/y}wheel_zoom tools #4405

Closed
Josucatalina opened this issue May 2, 2020 · 1 comment · Fixed by #4413
Closed

Using {x/y}wheel_zoom tools #4405

Josucatalina opened this issue May 2, 2020 · 1 comment · Fixed by #4413
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@Josucatalina
Copy link

Using first ywheel_zoom before xwheel_zoom or wheel_zoom tools in datashaded DynamicMap in Bokeh server ends in error. If any of the other tools is used before ywheel_zoom using it works properly

def timeseries(data):
    return hv.Curve(dict(Date=data[0], Value=data[1]), 'Date', (('Value', data[2])))

dmap = hv.DynamicMap(timeseries, streams=[pipe])
datashade(dmap).opts(
    width=1200,  height=600, tools=['xwheel_zoom', 'pan'],
    active_tools=['xwheel_zoom', 'pan'], default_tools= ['reset', 'ywheel_zoom', 'save', hover]
)

Bug:

Screentogif1

future: <Future finished exception=UFuncTypeError(<ufunc 'true_divide'>, (dtype('<M8[ns]'), dtype('float64')))>
Traceback (most recent call last):
  File "c:\users\catal\appdata\local\programs\python\python36\lib\site-packages\tornado\gen.py", line 191, in wrapper
    result = func(*args, **kwargs)
  File "c:\users\catal\appdata\local\programs\python\python36\lib\site-packages\holoviews\plotting\bokeh\callbacks.py", line 418, in process_on_change
    self.on_msg(msg)
  File "c:\users\catal\appdata\local\programs\python\python36\lib\site-packages\holoviews\plotting\bokeh\callbacks.py", line 141, in on_msg
    processed_msg = self._process_msg(filtered_msg)
  File "c:\users\catal\appdata\local\programs\python\python36\lib\site-packages\holoviews\plotting\bokeh\callbacks.py", line 815, in _process_msg
    x0 = convert_timestamp(x0)
  File "c:\users\catal\appdata\local\programs\python\python36\lib\site-packages\holoviews\plotting\bokeh\util.py", line 98, in convert_timestamp
    datetime = dt.datetime.utcfromtimestamp(timestamp/1000.)
numpy.core._exceptions.UFuncTypeError: ufunc 'true_divide' cannot use operands with types dtype('<M8[ns]') and dtype('float64')

But if I restart the server and use the xwheel_zoom first works perfectly:

Screentogif2

Thank You,

Josu Catalina.

@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label May 2, 2020
@philippjfr philippjfr added this to the v1.13.3 milestone May 5, 2020
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants