I use the R package radarchart for plotting interactive radarcharts. I want to manipulate the plot by setting parameters, which are not mentioned in the package manual. Its possible to pass options to chart.js by ... argument by using matching options to http://www.chartjs.org/docs/#getting-started-global-chart-configuration.
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))
chartJSRadar(scores=scores, labs=labs)
For example, I tried to change the grid color, but this doesn't work.
chartJSRadar(scores=scores, labs=labs,
scale=list(gridLines=list(color="black")))
a little late to this (radarchart author here).
The short answer is that this is a bug. I've made an issue: https://github.com/MangoTheCat/radarchart/issues/39 and will report back when fixed.
Longer answer is in two bits. radarchart only just got updated to use the latest chart.js version (version 2.4.0) so the syntax you would need to update to get the version 2 syntax.
However, the way the optional arguments are nested now means that this still won't work.
The cleanest way to fix it will be in the proposed API changes for the version 1 release. However, if I can add support for it in the mean time I'll post here to update you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With