Switch branches/tags
Nothing to show
Find file History
Latest commit a76742f May 17, 2017
Permalink
..
Failed to load latest commit information.
www some updates May 8, 2016
README.md Update README.md May 18, 2017
app.R [MODIFY] Fixed library(shiny) missing. Aug 30, 2016
plot-spinner.gif add gifs May 10, 2016

README.md

Show a spinning "loading" animation while a plot is recalculating

Update: There is now a package shinycssloaders to do this easier!

When a Shiny plot is recalculating, the plot gets grayed out. This app shows how you can add a spinner wheel on top of the plot while it is recalculating, to make it clear to the user that the plot is reloading. There can be many different ways to achieve a similar result using different combinations of HTML/CSS, this example is just the simplest one I came up with.

The idea is to place a spinner image in the same container as the plot, center it, and give it a below-default z-index. Whenever the plot is recalculting, make the plot's z-index even lower so that the spinner will show.

See a real shiny app where I used this concept


Demo