【发布时间】:2020-12-18 09:41:10
【问题描述】:
我的闪亮应用中有这段代码,
有人能告诉我为什么show.legend = FALSE 不工作吗?
我想删除图例。
这是我的项目http://webcovid19.online/ 图例不起作用,例如这里http://webcovid19.online/?country=Slovakia
output$dead_inc_country_bar_plot <- renderPlotly({
ggplotly(
ggplot(filtered_dead_inc_country_bar_data(), aes(x = date, y = deaths, color = country,group = country, text=paste(date, "\n" , country, " " ,deaths ))) +
geom_bar(stat='identity',fill='red', show.legend = FALSE) +
scale_x_date(limits = as.Date(c(ymd(date_last)-30,ymd(date_last)+1))) +
scale_y_continuous(labels = comma, limits = c(0, NA)),
tooltip = "text"
) %>%
style (hoverlabel = list(font=list(size=20)))
}
)
【问题讨论】: