Description Usage Arguments Examples
R bindings to the radar plot in the chartJS library.
1 2 3 4 |
scores |
Named list of scores for each axis |
labs |
Labels for each axis |
width |
Width of output plot |
height |
Height of output plot |
maxScale |
Max value on each axis |
scaleStepWidth |
Spacing between rings on radar |
scaleStartValue |
Value at the centre of the radar |
responsive |
Logical. whether or not the chart should be responsive and resize when the browser does |
labelSize |
Numeric. Point label font size in pixels |
addDots |
Logical. Whether to show a dot for each point |
colMatrix |
Numeric matrix of rgb colour values |
polyAlpha |
Alpha value for the fill of polygons |
lineAlpha |
Alpha value for the outlines |
... |
Extra options passed straight to chart.js |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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))
# Default settings
chartJSRadar(scores=scores, labs=labs)
# Fix the max score
chartJSRadar(scores=scores, labs=labs, maxScale=10)
# Fix max and spacing
chartJSRadar(scores=scores, labs=labs, maxScale=12, scaleStepWidth = 2)
# Add pass through settings for extra options
chartJSRadar(scores=scores, labs=labs, maxScale =10, scaleLineWidth=5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.