r - 在绘图图中隐藏范围滑块()中的文本
问题描述
有没有办法text
在主图表中显示唯一而不是在rangeslider()
没有完全显示的地方?
library(plotly)
x <- c('Product A', 'Product B', 'Product C')
y <- c(20, 14, 23)
text <- c('27% market share', '24% market share', '19% market share')
data <- data.frame(x, y, text)
fig <- plot_ly(data, x = ~x, y = ~y, type = 'bar',
text = y, textposition = 'outside',
# rotate label
textangle = 90,
marker = list(color = 'rgb(158,202,225)',
line = list(color = 'rgb(8,48,107)', width = 1.5)))
fig <- fig %>% layout(title = "January 2013 Sales Report",
xaxis = list(rangeslider=list(),fixedrange=T, title = ""),
yaxis = list(rangeslider=list(),fixedrange=T,title = ""))
fig
解决方案
推荐阅读
- python - 如何关闭与 PyMySQL 库中返回值的连接?
- reactjs - React Web 应用程序注入文本病毒
- ios - 突出显示表格视图单元格时显示波纹效果
- android - OnResume 方法在使用 startActivity(intent) 启动新活动时未执行
- javascript - 在 redux 中使用 AsyncStorage 保存布尔数据
- elasticsearch - elasticsearch & nginx:一个站点的不同用户权限的基本授权
- sharepoint - 角色、角色服务或功能名称无效:“InkandHandwritingServices”。找不到名称 Office Online Server
- elasticsearch-5 - 使用 Java 进行 ElasticSearch 聚合
- javascript - Bash 字符串替换函数类似于 Javascript String.prototype.replace()
- php - 获取所有标题的问题