cosname / recharts

An interface to ECharts
https://recharts.cosx.org
BSD 3-Clause "New" or "Revised" License
337 stars 150 forks source link

Rstudio为啥不出图? #68

Open luffyye8670 opened 6 years ago

luffyye8670 commented 6 years ago

请帮忙看下,RStudiod不显示图,代码如下

library(shiny) library(shinydashboard) library(recharts)

ui<-fluidPage( box(eChartOutput("chart"),width = NULL) )

server <- function(input, output,session) { output$chart<-renderEChart({ df2 <- data.frame( saleNum=c(10,20,30,40,50,60,70,15,25,35,45,55,65,75,25,35,45,55,65,75,85), seller=c(rep("Yellow",7), rep("Red",7), rep("White",7)), weekDay = c(rep(c("Mon","Tue","Wed","Thu","Fri","Sat","Sun"),3)), stringsAsFactors =FALSE ) eBar(dat= df2, xvar=~weekDay, yvar=~saleNum, series=~seller) }) }

shinyApp(ui, server)