Hi Andres,
I was able to fix this by making a change in the server code. I used bg="transparent" and explicitly specified the color to be filled in the style of the plot.
library(ggplot2)
library(tidyverse)
library(shiny)
df <- data.frame(
"category"=c("A", "B", "C"),
"color"=c("#98D278","#EA4F62","#F5A623"),
"volume"=c(4321, 1200, 500)
)
ui <- fluidPage(
fluidRow(
column(
width=6,
column(
width=6,
fluidRow(plotOutput("plot"), style = "height:400px; background-color: #1B2036;")
)
)
)
)
server <- function(input, output) {
output$plot <- renderPlot({
ggplot(df, aes(fill=category, x = 2, y = volume))+
geom_bar(stat = "identity", alpha=0.8, fill = df$color) +
xlim(.2,2.5) +
coord_polar("y")+
theme_void()+
theme(panel.background = element_rect(fill = '#1b2036',size = 0))
},bg="transparent")
}
shinyApp(ui = ui, server = server)