Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Animation of plots in Dash App

$
0
0

@HansPeter123 wrote:

Hi there. I am using R and found the ‘Intro to Animations’ article (https://plot.ly/r/animations/) very useful to animate a 3d scatter plot. it works very fine even if I open this plot in the browser (Safari). But when I try to integrate this plot into a Dash App it stops working. Neither the play button nor using the slider manually works. The plot is and stays stuck in the very first position. Everything else seems indistinguishable.
So is it not possible to use animated plots of this type in the Dash App or did I made some error?

Thanks :slight_smile:

I included some code that everybody can copy and check for themselves. It is basically an example from the aforementioned link.

df <- data.frame(
  x = c(1,2,1), 
  y = c(1,2,1), 
  f = c(1,2,3)
)

p <- df %>%
  plot_ly(
    x = ~x,
    y = ~y,
    frame = ~f,
    type = 'scatter',
    mode = 'markers',
    showlegend = F
  )

p

This is the example and works fine.

app = Dash$new()

app$layout(
  dccGraph(id = 'p', figure = p)
)

app$run_server()

Now integrated into the Dash App. Does not work anymore.

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles