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

Allow editing slider values as text, at least for DynamicMap #675

Open
jbednar opened this issue May 11, 2016 · 5 comments
Open

Allow editing slider values as text, at least for DynamicMap #675

jbednar opened this issue May 11, 2016 · 5 comments
Labels
type: enhancement Minor feature or improvement to an existing feature
Milestone

Comments

@jbednar
Copy link
Member

jbednar commented May 11, 2016

For a bounded DynamicMap, e.g. this cell from the DynamicMap tutorial:

image

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.

@vascotenner
Copy link

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.

@jbednar
Copy link
Member Author

jbednar commented Jun 3, 2016

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.

@jakirkham
Copy link

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.

@philippjfr philippjfr transferred this issue from holoviz/holoviews Oct 3, 2019
@philippjfr philippjfr added the type: enhancement Minor feature or improvement to an existing feature label Jan 20, 2020
@philippjfr philippjfr modified the milestones: v0.8.0, v0.8.x Jan 23, 2020
@philippjfr philippjfr modified the milestones: v0.8.x, v0.9.0, v0.9.1 Mar 12, 2020
@philippjfr philippjfr modified the milestones: v0.9.2, v0.9.4 Mar 21, 2020
@philippjfr philippjfr modified the milestones: v0.9.4, v0.9.5, v0.9.6 Apr 2, 2020
@philippjfr philippjfr modified the milestones: v0.9.6, v0.10.0 May 19, 2020
@philippjfr philippjfr modified the milestones: v0.10.0, next Aug 24, 2020
@jbednar jbednar mentioned this issue Mar 22, 2021
2 tasks
@philippjfr philippjfr modified the milestones: next, v0.12.0 Jun 29, 2021
@philippjfr philippjfr modified the milestones: next, 0.13.0 Aug 12, 2021
@MarcSkovMadsen
Copy link
Collaborator

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

image

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()

@philippjfr
Copy link
Member

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.

@philippjfr philippjfr modified the milestones: v0.13.0, Wishlist Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Minor feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

5 participants