I have a plot that I show in a box and I want to modify the size of the box, but the plot is bigger than the box.How can I modify both of them, so that the plot remains and fits the box?
#in ui.r
box(
title = "Veniturile si cheltuielile",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
plotOutput("ven_vs_chelt")
)
#in server.r
output$ven_vs_chelt <- renderPlot({
ggplot(ven_ch, aes(x=ven_ch$ani_tot, y=ven_chelt, fill=tip)) +
geom_bar(stat="identity", position=position_dodge(), colour="black") +
xlab("An") + ylab("Valoare venituri si cheltuieli(lei)") +
scale_fill_manual(values=c("#F78181", "#81F79F"))
})