Chartjs-Pass numeric matrix of rgb color values to chartJSRadar() in R

3👍

Finally found a way to format RGB values in a matrix format acceptable to Radarchart. I used grDevices::col2rgb to do so –

c <- grDevices::col2rgb(c("orange","blue", "black"))

Then I just dropped c into the argument list –

chartJSRadar(radarcounts, maxScale = 90, addDots = F, lineAlpha = 0, colMatrix = c)

There is probably a better way to do this, but this is what I found.

Leave a comment