我想从饼图的选定部分获取数据,假设我选择蓝色部分,如图所示,我从该部分获得数据,即二月
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)
})
})
任何帮助将不胜感激