rAmCharts - amRadar

Parameters

  • data: data.frame first column is named “label” (character), other columns are series of values
  • col: character, color(s) of serie(s) hexadecimal like “#00FF00”
  • backTransparency: numeric, background transparency, between 0 and 1
  • type: character, type of radar, must be “polygons” or “circle”
  • pch: character, symbols must be in “round”, “square”, “triangleUp”, “triangleDown”, “triangleLeft”, “triangleRight”, “bubble”,“diamond”, “xError”, “yError”
  • : see amOptions for more options

Data used in the examples

data <- data.frame(label = c("A", "Z", "E", "R", "T"),
                   Product1 = c(1, 2, 3, 4, 2), 
                   Product2 = c(2, 8, 1, 1, 0),
                   Product3 = c(1,1,2,2,4))

Basic exemple

amRadar(data = data)

Change color

amRadar(data = data, col = c("#0000FF", "#00FF00", "#FF0000"))

backTransparency

amRadar(data = data, backTransparency = 1)
amRadar(data = data, backTransparency = c(0, 0.4, 0.6))

type

amRadar(data = data, type = "circles")

pch

amRadar(data = data,  pch = "yError", backTransparency = 0)

amOptions

legend

amRadar(data = data,  pch = "bubble", backTransparency = 0, legend = TRUE)
#or
amRadar(data = data,  pch = "bubble", backTransparency = 0) %>>% 
  amOptions(legend = TRUE)

legendPosition

amRadar(data = data,  pch = "bubble", backTransparency = 0, legend = TRUE, 
        legendPosition = "left")
#or
amRadar(data = data,  pch = "bubble", backTransparency = 0) %>>% 
  amOptions(legend = TRUE, legendPosition = "left")

export

amRadar(data = data,  pch = "bubble", backTransparency = 0, export = TRUE)
#or
amRadar(data = data,  pch = "bubble", backTransparency = 0) %>>% 
  amOptions(export = TRUE)

exportFormat

amRadar(data = data,  pch = "bubble", backTransparency = 0, export = TRUE, exportFormat = "JPG")
#or
amRadar(data = data,  pch = "bubble", backTransparency = 0) %>>% 
  amOptions(export = TRUE, exportFormat = "JPG")

main and creditsPosition

amRadar(data = data,  pch = "bubble", backTransparency = 0, main = "My Radar",
        mainColor = "#68838B", mainSize = 25, creditsPosition = "bottom-right")
#or
amRadar(data = data,  pch = "bubble", backTransparency = 0) %>>% 
  amOptions( main = "My Radar",
        mainColor = "#68838B", mainSize = 25, creditsPosition = "bottom-right")

theme

amRadar(data = data,  pch = "bubble", backTransparency = 1, theme = "patterns")
#or
amRadar(data = data,  pch = "bubble", backTransparency = 1) %>>% 
  amOptions(theme = "patterns")