我想从饼图的选定部分获取数据假设我选择了图中的蓝色部分,所以我从该部分获取数据,即二月
shinyServer(function(input, output, session) {
usvltdyearstore1 = data.frame(
Sold_that_area=as.numeric(as.character(usvltdprodmonyear$QTY)),
Month =usvltdprodmonyear$MONTHNAME,
TOTAL= usvltdprodmonyear$TOTAL,
stringsAsFactors = FALSE
)
output$usvltdmonthprod=renderPlotly({
n1<-plot_ly(usvltdyearstore1,labels = ~Month,values = ~TOTAL, type = 'pie',textinfo = "none")%>%add_pie(hole = 0.6)
})
})
任何帮助将不胜感激