-
-
Notifications
You must be signed in to change notification settings - Fork 477
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
Allow editing slider values as text, at least for DynamicMap #675
Comments
It would be very cool if values can be entered outside the range of the param, and that than the param range would increase. Often, when I investigate some parameter space, I find halfway that my ranges are insufficient. It is quite a work to create a new dmap with a larger range, set the other x parameters back to their values. |
Makes sense. Sounds like you want something like the param package's "softbounds". ipywidgets sliders now allow editing the textual value; not sure if that's any help when trying to implement this. |
As noted in issue ( holoviz/holoviews#2178 ), would be nice to see this in the context of Gridded Datasets as well. Still new to holoviews, so sorry if I'm just repeating what's in the OP. |
I will close this one. The initial request of editing slider values have been solved with https://blog.holoviz.org/panel_0.12.0.html#New-widgets For example we can now do import param
import panel as pn
import holoviews as hv
import numpy as np
slider = pn.widgets.EditableFloatSlider(name='EditableFloatSlider', start=0, end=3.14)
def plot(value):
xs = np.linspace(-5,5,100)
return hv.Curve((xs,-(xs-2)**2)) * hv.Text(0, -30, str(value))
plot=pn.bind(plot, value=slider)
pn.Column(
slider,
pn.pane.HoloViews(hv.DynamicMap(plot))
).servable() |
Thanks @MarcSkovMadsen but that's not really what the request was. For this issue to be fully addressed the HoloViews pane would have to support this by default for float/int based widgets. |
For a bounded DynamicMap, e.g. this cell from the DynamicMap tutorial:
the slider values can be set only to the precision supported by the slider, which is a couple of digits when dragging the slider, and (for this example at least) a precision of 0.001 when using the left and right arrow keys to adjust the value more precisely. It would be great if we could click in the text box and type an arbitrarily precise value, since the underlying object supports any such value.
Obviously, such a feature would require error checking, such as cropping the value to the bounds of the range, but that doesn't seem onerous to implement. It makes the most sense for a DynamicMap, because it's the only way I can see to provide arbitrarily precise values, but it could also be implemented for a regular HoloMap by snapping the value to the nearest defined value.
The text was updated successfully, but these errors were encountered: