2017-09-15 111 views
0

美好的一天它可能在這裏顯示標籤?R顯示barPlot標籤

image-label

這是barPlot。

output$bar<-{(renderPlot(barplot(data_percent,names.arg =tableData$Country,col=rainbow(length(tableData$Country)))))} 
+1

你可以添加樣本數據嗎? – User632716

回答

3

這裏是highcharter包的示例:

library(shiny) 
library(highcharter) 
library(ggplot2) 

ui <- list(highchartOutput("hcontainer",height = "400px",width = "500px")) 

server <- function(input, output) { 
    output$hcontainer <- renderHighchart({ 
    hchart(diamonds$cut, type = "column",dataLabels = list(enabled=TRUE)) 
    }) 
} 

shinyApp(ui, server) 

enter image description here