Webpage with reactive plot animation

I’d like to have a webpage with a plot which gets updated automatically every second, and which depends on some user input. Schematically, something like:

julia> xs = [0]; vx = ReactiveSlider(initial_value=1)
       while true
           push!(xs, xs[end]+vx[])  
           println(x)
           sleep(1)
           plot!(xs)   # update plot
       end

Or, for a concrete example, “Here is a plot of how much distance the car has traveled so far (x). Adjust the slider value to adjust the speed of the car (vx) in real time”

I was able to get this working in Pluto. But as far as I know, one can still not easily serve a (dynamic, julia-process-backed) notebook as a webpage that multiple people can access simultaneously, right? What would be my best option for this? Dash? Genie? Dash being stateless makes it sound messy (from my limited experience).

2 Likes

Did you have a look at Bonito.jl and Oxygen.jl?

3 Likes