business-science / tidyquant

Bringing financial analysis to the tidyverse

Home Page:https://business-science.github.io/tidyquant/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tidyquant::geom_candlestick

j-craggy opened this issue · comments

https://business-science.github.io/tidyquant/reference/geom_chart.html

Warning: The following aesthetics were dropped during statistical transformation: open, high, low, close, y
ℹ This can happen when ggplot fails to infer the correct grouping structure in the data.
ℹ Did you forget to specify a group aesthetic or to convert a numerical variable into a factor?

Used to work, but even the vignette is broken.

commented

I experience the very same problem, not only with geom_chart, but also with geom_bar. The irony is that the most basic examples from the tutorial does not show up coerrectly .

Error reported by ggplot:

Error in geom_candlestick():
! Problem while computing stat.
i Error occurred in the 1st layer.
Caused by error:
! (converted from warning) Computation failed in stat_linerange_bc()
Caused by error:
! (converted from warning) The following aesthetics were dropped during statistical transformation:
open, high, low, close, y
i This can happen when ggplot fails to infer the correct grouping structure
in the data.
i Did you forget to specify a group aesthetic or to convert a numerical
variable into a factor?

@mdancho84 probably wants a PR done but I don't know how. I guess the package is broken forever.

This is due to ggplot2 3.4.0 https://ggplot2.tidyverse.org/news/index.html?q=dropped_aes#new-features-3-4-0

They added dropped_aes.

I don't know ggproto much. tidyverse/ggplot2#5185 but here is how they fixed it for geom_smooth()

This is fixed now. Thanks @olivroy

Still an issue, I was wondering if you were able to provide guidance for thst @mdancho84

Will need to investigate. Low priority for me at the moment.