在下面的 plotly 條形圖中,我如何才能只保留hoverinfo并跳過條形內的文本?
library(plotly)
x <- c('Product A', 'Product B', 'Product C')
y <- c(20, 14, 23)
data <- data.frame(x, y)
fig <- plot_ly(
data = as.data.frame(data),
x = ~ x,
y = ~ y,
type = "bar",
marker = list(color = 'rgb(158,202,225)',
line = list(color = 'rgb(8,48,107)',
width = 1.5))
,
text = paste(
"X :",
data$x,
"<br> Count of Issue :",
data$y
),
hoverinfo = "text"
)
fig
uj5u.com熱心網友回復:
從
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/409168.html
標籤:
下一篇:變異子集平均值并添加到所有組R
