If the marksargument for dcc_slideris constructed using an array of Floats, with zero as decimal (ex: 0.0:10.0), the labels are missing. The labels are displayed fine if I use either an array of Ints or an array of Floats with decimals other than zero (ex: 0.5:0.5:10.5)
using Dash, DashHtmlComponents, DashCoreComponents
# years = 0:10 # labels ok
years = 0.0:10.0 # labels missing
# years = 0.5:0.5:10.5 # labels ok
app = dash()
app.layout = html_div() do
dcc_slider(
id = "slider1",
min = minimum(years),
max = maximum(years),
marks = Dict([Symbol(v) => Symbol(v) for v in years]),
value = minimum(years),
step = nothing,
)
end
run_server(app, "0.0.0.0", debug = true)
As posted on discourse forum: https://discourse.julialang.org/t/dash-jl-slider-doesnt-display-labels/66253
If the
marks
argument fordcc_slider
is constructed using an array of Floats, with zero as decimal (ex: 0.0:10.0), the labels are missing. The labels are displayed fine if I use either an array of Ints or an array of Floats with decimals other than zero (ex: 0.5:0.5:10.5)