amOptions: amOptions

Description Usage Arguments Details See Also Examples

Description

amOptions sets the most common options for chart customization. You can set other properties with the method setProperties. See details for exception.

Usage

1
2
3
4
5
6
7
amOptions(chart, theme = c("none", "light", "dark", "patterns", "chalk"),
  legend = FALSE, legendPosition = "right", legendAlign = "left",
  export = FALSE, exportFormat = character(),
  creditsPosition = "top-left", main = character(), mainColor = "#000000",
  mainSize = 15, zoom = FALSE, scrollbar = FALSE, scrollbarHeight = 20,
  valuescrollbar = FALSE, valuescrollbarHeight = 20, labelRotation = 0,
  ...)

Arguments

chart

AmChart.

theme

character, possible values are : "none", "light", "dark", "patterns", "chalk", default set to "none".

legend

logical, default FALSE. TRUE to add a legend to the chart.

legendPosition

character, possible values are : "left", "right", "top" or "bottom", default set to "right".

legendAlign

character, controls the legend alignement. Possible values are : "left","right" or "center", default set to "left". Only used if legend = TRUE.

export

logical, default set to FALSE. TRUE to display export feature.

exportFormat

character, desired export format. Possible values are : "JPG", "PNG" ,"SVG", "CSV", "JSON", "PDF", "XLSX", "PRINT".

creditsPosition

character, controsl credits position. Possible values are : "top-left", "top-right", "bottom-left" or "bottom-right", default set to "top-left".

main

character, chart's title.

mainColor

character, main color (in hexadecimal), default set to "#000000".

mainSize

numeric, main size, default set to 15.

zoom

logical, TRUE to add a chart cursor, default set to FALSE.

scrollbar

logical, default FALSE, TRUE to display scrollbar.

scrollbarHeight

numeric, height in pixels, must be > 0.

valuescrollbar

logical, default FALSE, TRUE to display valuescrollbar.

valuescrollbarHeight

numeric, height in pixels, must be > 0.

labelRotation

numeric, rotation angle of a label. Only horizontal axis' values can be rotated. Value must be between -90 and 90.

...

Other properties added to the chart using setProperties.

Details

Exception:

  • It's not possible to export a gauge chart data as CSV.

See Also

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
library(pipeR)
data(data_pie) 

# Export                 
amPie(data = data_pie) %>>%
  amOptions(export = TRUE)

# Legend
amPie(data = data_pie) %>>%
  amOptions(legend = TRUE)

# Legend position
amPie(data = data_pie) %>>%
  amOptions(legend = TRUE, legendPosition = "bottom")

# Credits position
amPie(data = data_pie) %>>%
  amOptions(creditsPosition = "bottom-right")

# Theme
amPie(data = data_pie) %>>%
  amOptions(theme = "chalk")

# Title
amPie(data = data_pie) %>>%
  amOptions(main = "Social network", mainColor = "#FFFFFF", mainSize = 40, theme = "chalk")


# Custom exemple
amPie(data = data_pie) %>>%
  amOptions(main = "Social network", mainColor = "#FFFFFF", mainSize = 40,
            theme = "dark", legend = TRUE, legendPosition = "bottom",
            creditsPosition = "bottom-right" )


Search within the rAmCharts package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.