我正在尝试使用https://www.amcharts.com/demos/animated-gauge/所示的软件包rAmCharts
在R中实现仪表图。
下面是我的代码
amAngularGaugeChart() %>%
setAxis(topTextFontSize = 20,
topTextYOffset = 70,
axisColor = "#31d6ea",
axisThickness = 1,
endValue = 100,
gridInside = true,
inside = true,
radius = "50%",
valueInterval = 10,
tickColor = "#67b7dc",
startAngle = -90,
endAngle = 90,
unit = "%",
bandOutlineAlpha = 0,
bands = list(list(color = "#0080ff",
endValue = 100,
innerRadius = "105%",
radius = "170%",
gradientRatio = c(0.5, 0, -0.5),
startValue = 0),
list(color = "#3cd3a3",
endValue = 0,
innerRadius = "105%",
radius = "170%",
gradientRatio = c(0.5, 0, -0.5),
startValue = 0))) %>%
setArrows(alpha = 1,
innerRadius = "35%",
nailRadius = 0,
radius = "170%")
但是,使用上面的代码,我遇到了以下错误:
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘setAxis’ for signature ‘"AmChart", "missing"’
任何有关如何使用rAmCharts
在R中正确实现动画仪表图的指针。