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

Slider assigns wrong values if given a range of Unitful values? #74

Closed
schneiderfelipe opened this issue Feb 9, 2021 · 1 comment · Fixed by #148
Closed

Slider assigns wrong values if given a range of Unitful values? #74

schneiderfelipe opened this issue Feb 9, 2021 · 1 comment · Fixed by #148
Labels
needs Pluto.jl feature Can't be done right now because something is missing from Pluto.jl itself

Comments

@schneiderfelipe
Copy link

Hi, I think I found a bug regarding the use of PlutoUI.jl together with Unitful.jl. Basically, Slider changes some values unexpectedly when given Unitful ranges.

A working example would be:

begin
    using Unitful
    @bind T Slider((1000:6000)u"K", show_value=true)
end

Captura de tela de 2021-02-09 17-06-05

@fonsp
Copy link
Member

fonsp commented Mar 2, 2021

Hey! The solution to this would be #3, in the meantime you need to add a second cell:

T_withunit = T * u"K"

@fonsp fonsp added the needs Pluto.jl feature Can't be done right now because something is missing from Pluto.jl itself label Mar 2, 2021
@fonsp fonsp linked a pull request Nov 1, 2021 that will close this issue
@fonsp fonsp closed this as completed in #148 Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs Pluto.jl feature Can't be done right now because something is missing from Pluto.jl itself
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants