3

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")))
pat2402
  • 79
  • 7
  • 1
    I guess you get an error because R does not know whether you meant `scaleStepWidth` or `scaleStartValue`. However, something like `chartJSRadar(scores=scores, labs=labs, title = list(display = TRUE, text = "asdsd"))` also yields no result, although I would have expected a title. I'd be interested in a solution, too. – lukeA Oct 13 '16 at 09:57

1 Answers1

1

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.

dougmet
  • 635
  • 4
  • 19