我正在尝试将自定义选项传递给chartJSRadar
每个http://www.chartjs.org/docs/#chart-configuration-creating-a-chart-with-options。在此示例中,我尝试传递一个简单的标题,但遇到此错误:
Error in validateCssUnit(sizeInfo$width) :
CSS units must be a single-element numeric or character vector
示例代码:
library(radarchart)
labs <- c("Communicator", "Data Wangler", "Programmer",
"Technologist", "Modeller", "Visualizer")
scores <- list(
"Rich" = c(9, 7, 4, 5, 3, 7),
"Andy" = c(7, 6, 6, 2, 6, 9),
"Aimee" = c(6, 5, 8, 4, 7, 6)
)
opList <- list(title=list(display='true', text='Title'))
chartJSRadar(scores = scores, labs = labs, maxScale = 10, opList)