It might be possible to support _all_ ggplot2's coordinate systems via plotly.js' cartesian coordinates:
layout.axisid.showgrid = falseHi @cpsievert, I just wanted to check in on the functionality for polar coordinates; I'm having the same error as #760.
Thank you!
Has this issue been solved - I have code that used to work for a pie chart that will not work. I can get the geom_bar chart working but once I add the coord_polar() it breaks. Any help is appreciated.
thanks
@nicolescoggins can u please provide a minimal example?
Hi @cpsievert ,
I knocked up a quick minimal example, using airquality.
This draws with ggplot but when I go to use ggplotly, I get the error below.
ggplotly(ggplot(airquality, order = xp) +
geom_bar(aes(x = Month,
y = Temp,
fill = Solar.R)
,
position = "fill",
stat = "identity",) +
coord_polar("y")
)
Error in zero_range(to) : x must be length 1 or 2
In addition: Warning messages:
1: In min(z$x.range) : no non-missing arguments to min; returning Inf
2: In max(z$x.range) : no non-missing arguments to max; returning -Inf
3: In min(z$y.range) : no non-missing arguments to min; returning Inf
4: In max(z$y.range) : no non-missing arguments to max; returning -Inf
hi i'm getting the same error while using ggplotly for pie chart.
can anyone pls help?
@cpsievert I am having the same issue as @gsainsbury86
Me too
Also having the same issue, my MWE is available here and is as follows
library(ggplot2)
library(plotly)
# Create fake data
df <- data.frame(
genre=c("Pop", "HipHop", "Latin", "Pop", "Pop", "HipHop"),
artist=c("ArianaGrande", "ChrisBrown", "DaddyYankee", "EdSheeran",
"LewisCapaldi", "ShawnMendes")
)
# Create a ggplot bar plot in polar coordinates
p <- ggplot(data=df) +
geom_bar(aes(x=genre, fill=artist)) + coord_polar()
# Wrap it around plotly
ggplotly(p)
Supporting pie charts (coord_polar) would be awesome!
@rstudio Carson Sievert, Has this issue been resolved?
Thanks
Seems pie chart for ggplotly doesn't support yet. Would like to see that in the future. Thanks
Adding my voice to the chorus...I would really like to be able to do pie / donut charts using ggplotly()!
I would like it too!
Has this issue been resolved?
Has this issue been resolved?
I don't think so, because issue #878 does not appear here:
https://cran.rstudio.com/web/packages/plotly/news/news.html
Most helpful comment
Supporting pie charts (coord_polar) would be awesome!