在plotly悬停文本的默认选项中,我有 3 行文本,我想删除两行并只留下一行显示“计数”+“观察次数”
这条线不做任何事情
mode = 'text', text = ~Count,
Run Code Online (Sandbox Code Playgroud)
我还有 3 行文字,感谢您的帮助
p1 <- ggplot(cancer0,
mode = 'text', text = ~Count,
aes(x = cancer10[,1],
fill = cancer10[,2])) + geom_bar(position = input$pos) +
xlab("Factor") + ylab("Count") + theme_bw()
ggplotly(p1) %>% config(displayModeBar = F)
Run Code Online (Sandbox Code Playgroud)
这是输出的屏幕截图: