rAmCharts - amWind

Parameters

  • data: data.frame columns are series of values from week wind(first column) to strong wind (last column), row are wind direction.
  • col: character, color(s) of serie(s) hexadecimal like “#00FF00”
  • backTransparency: numeric, background transparency, between 0 and 1
  • : see amOptions for more options

Reference example

 data("data_wind")
data_wind
##   weak middle strong
## 1    1      2      1
## 2    2      8      1
## 3    3      1      2
## 4    4      1      2
## 5    1      2      1
## 6    2      8      1
## 7    1      1      1
## 8    2      2      2

Basic exemple

amWind(data = data_wind)

Change color

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

backTransparency

amWind(data = data_wind, col = c("#FF0000", "#00FF00", "#0000FF"), backTransparency = c(0.1, 0.2, 0.5))

amOptions

legend

amWind(data = data_wind, col = c("#FF0000", "#00FF00", "#0000FF"), legend = TRUE)
#or
amWind(data = data_wind, col = c("#FF0000", "#00FF00", "#0000FF"))%>>% 
  amOptions(legend = TRUE)

legendPosition

amWind(data = data_wind, col = c("#FF0000", "#00FF00", "#0000FF"), legend = TRUE,
        legendPosition = "left")
#or
amWind(data = data_wind, col = c("#FF0000", "#00FF00", "#0000FF")) %>>% 
  amOptions(legend = TRUE, legendPosition = "left")

export

amWind(data = data_wind, col = c("#FF0000", "#00FF00", "#0000FF"), export = TRUE)
#or
amWind(data = data_wind, col = c("#FF0000", "#00FF00", "#0000FF")) %>>% 
  amOptions(export = TRUE)

exportFormat

amWind(data = data_wind, col = c("#FF0000", "#00FF00", "#0000FF"), export = TRUE, exportFormat = "JPG")
#or
amWind(data = data_wind, col = c("#FF0000", "#00FF00", "#0000FF")) %>>% 
  amOptions(export = TRUE, exportFormat = "JPG")

main and creditsPosition

amWind(data = data_wind, col = c("#FF0000", "#00FF00", "#0000FF"), main = "My Radar",
        mainColor = "#68838B", mainSize = 25, creditsPosition = "bottom-right")
#or
amWind(data = data_wind, col = c("#FF0000", "#00FF00", "#0000FF")) %>>% 
  amOptions( main = "My Radar",
        mainColor = "#68838B", mainSize = 25, creditsPosition = "bottom-right")

theme

amWind(data = data_wind, col = c("#FF0000", "#00FF00", "#0000FF"), theme = "patterns")
#or
amWind(data = data_wind, col = c("#FF0000", "#00FF00", "#0000FF")) %>>% 
  amOptions(theme = "patterns")