且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

以情节方式更改线条粗细

更新时间:2023-11-26 23:37:22

plot_ly(theData, x = ~matter_date, y = ~value, color = ~variable, colors         
=RColorBrewer::brewer.pal(12, "Set3"), type = "scatter", mode = "lines", 
line=list(width=~thickness)) %>% 
layout(
title = "Realization",
xaxis = list(rangeslider = list(type = "date")),#,
yaxis = list(title = "Realization Average%",
             range = c(0,105)
)

)

我遇到了同样的问题,这是我遇到的解决方案.希望它有帮助:)

I had the same kind of issue and this is the solution I came across. Hope it helps :)