-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Write (python) dash vs Dash.jl feature comparison table #200
Comments
Tentative listThings that are missing from Dash.jl since before Dash.jl v1 (and dash v1.15.0)taken from the TODO items in https://github.com/plotly/Dash.jl/projects/1
Things that are missing from Dash.jl from dash v1.x
Things that are missing from Dash.jl since dash v2note the dash v2 was released on 2021-08-03 🙃
Things that maybe just work using resources from dash >= v2.10.2Dash.jl resources were updated in #212 after an 18+ month hiatus. The update resources are set to be released as part of the upcoming Dash.jl TODO, check if
work in Dash.jl. |
Update
Tested with https://dash.plotly.com/dash-core-components/geolocation translated in Julia as: see Julia snippetusing Dash
app = dash()
app.layout = html_div() do
html_button("Update Position"; id = "update_btn"),
dcc_geolocation(; id = "geolocation"),
html_div(; id="text_position")
end
callback!(app,
Output("geolocation", "update_now"),
Input("update_btn", "n_clicks")) do click
return !isnothing(click) && (click > 1)
end
callback!(app,
Output("text_position", "children"),
Input("geolocation", "local_date"),
Input("geolocation", "position")) do date, pos
isnothing(pos) && return "No position data available"
return html_p("As of $date your location was:
lat $(pos.lat), lon $(pos.lon), accuracy $(pos.accuracy) meters")
end
run_server(app, "0.0.0.0", 8080) |
Update
does not work ❌ Translating this see Julia snippetusing Dash
app = dash()
app.layout = html_div() do
dcc_location(; id = "url", refresh = false),
dcc_location(; id = "callback-url", refresh = "callback-nav"),
html_button("click"; id = "callback-btn", n_clicks=0),
html_div(; id = "content")
end
callback!(app,
Output("content", "children"),
Input("url", "pathname")) do pathname
return if isnothing(pathname) || pathname == "/page-1"
html_div("1"; id = "div1")
elseif pathname == "/"
html_div("base", id = "div0")
else
"404"
end
end
callback!(app,
Output("callback-url", "pathname"),
Input("callback-btn", "n_clicks")) do n
return if n > 0
"/page-1"
else
no_update()
end
end
run_server(app) gives Screencast.from.2023-07-11.11-32-18.webmwhere the app hangs after pressing the back button. |
and put it in the Dash.jl README.md somewhere?
Resources:
The text was updated successfully, but these errors were encountered: