R级梯度echarts4r
我需要在r
中创建量规图,但是我无法在渐变颜色中制作“轴线”功能。
library(echarts4r)
gauge_x <- e_charts() %>%
e_gauge(800,
"Incerteza TC",
startAngle = 180,
endAngle = 0,
min = 0,
max = 1000,
splitNumber = 5,
radius = "185",
itemStyle = list(color = "#000000"),
#axisLine = list(lineStyle = list(color = list(type = "radial", x = "0.5", y = "0.5", r = "0.5",
#backgroundColor = radial_gradient))),
axisTick = list(lineStyle = list(width = 2, color = "#000000")),
splitLine = list(lineStyle = list(color = "#000000", type = "solid")),
axisLabel = list(show = TRUE, color = "#000000", fontWeight = "bold", borderRadius = 5),
pointer = list(show = TRUE, icon = "triangle", length = "80%"), itemStyle = list(color = "black"),
detail = list(show = TRUE, color = "#000000"),
title = list(show = TRUE, fontWeight = "bolder"))
print(gauge_x)
I'm needing to create a gauge graph in r
, but I can't make the "axisLine" function in gradient colors.
library(echarts4r)
gauge_x <- e_charts() %>%
e_gauge(800,
"Incerteza TC",
startAngle = 180,
endAngle = 0,
min = 0,
max = 1000,
splitNumber = 5,
radius = "185",
itemStyle = list(color = "#000000"),
#axisLine = list(lineStyle = list(color = list(type = "radial", x = "0.5", y = "0.5", r = "0.5",
#backgroundColor = radial_gradient))),
axisTick = list(lineStyle = list(width = 2, color = "#000000")),
splitLine = list(lineStyle = list(color = "#000000", type = "solid")),
axisLabel = list(show = TRUE, color = "#000000", fontWeight = "bold", borderRadius = 5),
pointer = list(show = TRUE, icon = "triangle", length = "80%"), itemStyle = list(color = "black"),
detail = list(show = TRUE, color = "#000000"),
title = list(show = TRUE, fontWeight = "bolder"))
print(gauge_x)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如我在文档,,您不能指定梯度颜色或
axisline
颜色的任何图案填充。您只能为细分指定各种颜色。根据文档,因此,您只能通过以下方式指定包含百分比和相应颜色的向量列表来为
axisline
上色:希望这会有所帮助!
As I am seeing in the documentation, you can not specify gradient color or any pattern fill for
axisLine
color in the gauge chart. You can only specify an array of colors for segments. As per the documentation,So you can only color the
axisLine
by specifying a list of vectors containing the percentages and corresponding colors in the following way :Hope this helps!