Skip to content

Area chart does not render #476

Description

@avrenli2

The animated chart does not render properly and it creates the following error messages:

Error occurred in the 1st layer.
Caused by error in unit():
'x' and 'units' must have length > 0
Problem while converting geom to grob.

library(ggplot2)
library(Rcpp)
library(gifski)
library(gganimate)
library(transformr)

library(quantmod)
CHAI <- getSymbols("SBUX" , from="2020-1-1" , to="2021-1-1" , auto.assign=F) 

CATROON <- ggplot(CHAI, aes(y=SBUX.Close,x=index(CHAI)))+
  geom_area(color="pink", size=1.2 , fill="pink" , alpha=0.3)+
  geom_point(color="#8F157E", size=4)+
  labs(x="Time", y="Close Price")+
  theme_bw() + transition_reveal(index(CHAI))  

animate(CARTOON, duration=7 , fps = 30)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions