Description Usage Arguments Details Value See Also Examples
Method to initialize any S4 class provided by the package.
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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | ## S4 method for signature 'AmChart'
initialize(
.Object,
allLabels,
arrows,
axes,
balloon,
categoryAxis,
categoryField,
chartCursor,
chartScrollbar,
creditsPosition,
dataProvider,
graphs,
graph,
guides,
legend,
segmentsField,
theme,
titles,
trendLines,
type,
valueAxes,
valueAxis,
valueScrollbar,
...
)
amChart(
allLabels,
arrows,
axes,
balloon,
categoryAxis,
categoryField,
chartCursor,
chartScrollbar,
creditsPosition,
dataProvider,
graph,
graphs,
guides,
legend,
segmentsField,
theme,
titles,
trendLines,
type,
valueAxes,
valueAxis,
...
)
amAngularGaugeChart(arrows, titles, axes, ...)
amFunnelChart(dataProvider, marginLeft = 10, marginRight = 10, ...)
amRadarChart(
allLabels,
balloon,
categoryField,
creditsPosition,
dataProvider,
graphs,
guides,
legend,
titles,
valueAxes,
...
)
amSerialChart(
allLabels,
balloon,
categoryAxis,
categoryField,
chartCursor,
chartScrollbar,
creditsPosition,
dataProvider,
graphs,
guides,
legend,
titles,
trendLines,
valueAxes,
...
)
amPieChart(
allLabels,
balloon,
creditsPosition,
dataProvider,
legend,
titles,
...
)
amGanttChart(categoryField, dataProvider, graph, segmentsField, valueAxis, ...)
amXYChart(creditsPosition, dataProvider, graphs, ...)
setAllLabels(.Object, allLabels)
## S4 method for signature 'AmChart,list'
setAllLabels(.Object, allLabels)
addLabel(.Object, label = NULL, ...)
## S4 method for signature 'AmChart,LabelOrMissing'
addLabel(.Object, label = NULL, ...)
setArrows(.Object, arrows = NULL)
## S4 method for signature 'AmChart'
setArrows(.Object, arrows = NULL)
addArrow(.Object, arrow = NULL, ...)
## S4 method for signature 'AmChart,GaugeArrowOrMissing'
addArrow(.Object, arrow = NULL, ...)
setAxes(.Object, axes, ...)
## S4 method for signature 'AmChart,list'
setAxes(.Object, axes)
addAxe(.Object, axe = NULL, ...)
## S4 method for signature 'AmChart,GaugeAxisOrMissing'
addAxe(.Object, axe = NULL, ...)
addAxis(.Object, axis = NULL, ...)
## S4 method for signature 'AmChart,GaugeAxisOrMissing'
addAxis(.Object, axis = NULL, ...)
## S4 method for signature 'AmChart,AmBalloonOrMissing'
setBalloon(.Object, amBalloon = NULL, ...)
setCategoryAxis(.Object, categoryAxis = NULL, ...)
## S4 method for signature 'AmChart'
setCategoryAxis(.Object, categoryAxis = NULL, ...)
setCategoryField(.Object, categoryField)
## S4 method for signature 'AmChart,character'
setCategoryField(.Object, categoryField)
setChartCursor(.Object, chartCursor = NULL, ...)
## S4 method for signature 'AmChart,ChartCursorOrMissing'
setChartCursor(.Object, chartCursor = NULL, ...)
setChartScrollbar(.Object, chartScrollbar = NULL, ...)
## S4 method for signature 'AmChart,ChartScrollbarOrMissing'
setChartScrollbar(.Object, chartScrollbar = NULL, ...)
setCreditsPosition(.Object, creditsPosition)
## S4 method for signature 'AmChart,character'
setCreditsPosition(.Object, creditsPosition)
setDataLoader(.Object, url, format, ...)
## S4 method for signature 'AmChart,character,character'
setDataLoader(.Object, url, format, ...)
## S4 method for signature 'AmChart,ANY,logicalOrMissing'
setDataProvider(.Object, dataProvider, keepNA = TRUE)
setGraphs(.Object, graphs)
## S4 method for signature 'AmChart,list'
setGraphs(.Object, graphs)
addGraph(.Object, amGraph = NULL, ...)
## S4 method for signature 'AmChart,AmGraphOrMissing'
addGraph(.Object, amGraph = NULL, ...)
## S4 method for signature 'AmChart,AmGraphOrMissing'
setGraph(.Object, graph = NULL, ...)
setGuides(.Object, guides)
## S4 method for signature 'AmChart,list'
setGuides(.Object, guides)
## S4 method for signature 'AmChart,GuideOrMissing'
addGuide(.Object, guide = NULL, ...)
setLegend(.Object, amLegend = NULL, ...)
## S4 method for signature 'AmChart,AmLegendOrMissing'
setLegend(.Object, amLegend = NULL, ...)
addSegment(.Object, categoryIDs, sgts)
## S4 method for signature 'AmChart,numeric'
addSegment(.Object, categoryIDs, sgts)
addSubData(.Object, categoryIDs, data)
## S4 method for signature 'AmChart,numeric'
addSubData(.Object, categoryIDs, data)
setSubChartProperties(.Object, .subObject = NULL, ...)
## S4 method for signature 'AmChart'
setSubChartProperties(.Object, .subObject = NULL, ...)
setTheme(.Object, theme)
## S4 method for signature 'AmChart,character'
setTheme(.Object, theme)
setTitles(.Object, titles)
## S4 method for signature 'AmChart,list'
setTitles(.Object, titles)
addTitle(.Object, title = NULL, ...)
## S4 method for signature 'AmChart,TitleOrMissing'
addTitle(.Object, title = NULL, ...)
setTrendLines(.Object, trendLines)
## S4 method for signature 'AmChart,list'
setTrendLines(.Object, trendLines)
addTrendLine(.Object, trendLine = NULL, ...)
## S4 method for signature 'AmChart,TrendLineOrMissing'
addTrendLine(.Object, trendLine = NULL, ...)
## S4 method for signature 'AmChart,character'
setType(.Object, type)
setValueAxes(.Object, valueAxes)
## S4 method for signature 'AmChart,list'
setValueAxes(.Object, valueAxes)
addValueAxes(.Object, valueAxis = NULL, ...)
## S4 method for signature 'AmChart,ValueAxisOrMissing'
addValueAxes(.Object, valueAxis = NULL, ...)
addValueAxis(.Object, valueAxis = NULL, ...)
## S4 method for signature 'AmChart,ValueAxisOrMissing'
addValueAxis(.Object, valueAxis = NULL, ...)
## S4 method for signature 'AmChart,ValueAxisOrMissing'
setValueAxis(.Object, valueAxis = NULL, ...)
setValueScrollbar(.Object, valueScrollbar, ...)
## S4 method for signature 'AmChart,ChartScrollbarOrMissing'
setValueScrollbar(.Object, valueScrollbar, ...)
|
.Object |
AmChart. |
allLabels |
|
arrows |
|
axes |
|
balloon |
AmBalloon.
Creates the balloons (tooltips) of the chart.
It follows the mouse cursor when you roll-over the data items.
The framework automatically generates the instances you just have to adjust
the appearance to your needs.
Run |
categoryAxis |
CategoryAxis.
Read-only. Chart creates category axis itself.
If you want to change some properties,
you should get this axis from the chart and set properties to this object.
Run |
categoryField |
|
chartCursor |
ChartCursor.
Chart's cursor.
Run |
chartScrollbar |
ChartScrollbar.
Chart's scrollbar.
Run |
creditsPosition |
|
dataProvider |
|
graphs |
|
graph |
AmGraph.
Only valid for Gantt charts.
Gant chart actually creates multiple graphs (separate for each segment).
Properties of this graph are passed to each of the created graphs
- this allows you to control the look of segments.
Run |
guides |
|
legend |
AmLegend.
Legend of a chart.
Run |
segmentsField |
|
theme |
|
titles |
|
trendLines |
|
type |
|
valueAxes |
|
valueAxis |
ValueAxis.
Only valid for Gantt Charts.
Set it's type to "date" if your data is date or time based.
Run |
valueScrollbar |
ChartScrollbar. Value scrollbar, enables scrolling value axes. |
... |
In case of constructor |
marginLeft |
|
marginRight |
|
label |
(optional) Label.
Argument of method |
arrow |
(optional) GaugeArrow.
Argument of method |
axe |
(optional) GaugeAxis.
Argument of deprecated method |
axis |
(optional) GaugeAxis. same as axe. |
amBalloon |
AmBalloon, argument of method 'setBalloon'. |
url |
|
format |
|
keepNA |
object of class |
amGraph |
(optional) AmGraph. |
guide |
(optional) Guide.
Argument of method |
amLegend |
(optional) AmLegend. |
categoryIDs |
|
sgts |
|
data |
|
.subObject |
AmChart. |
title |
(optional) Title, argument of method |
trendLine |
(optional) TrendLine.
Argument of method |
amAngularGaugeChart is a shortcut for instantiating AmChart of type gauge
.
amFunnelChart is a shortcut
for instantiating AmChart of type funnel
.
amRadarChart is a shortcut
for instantiating AmChart of type radar
.
amSerialChart is a shortcut constructor
for instantiating AmChart of type serial
.
amPieChart is a shortcut constructor
for instantiating AmChart of type pie
.
amGanttChart is a constructor
for instantiating AmChart of type gantt
.
amXYChart is a shortcut constructor
for instantiating AmChart of type xy
.
Method 'addAxe' is deprecated, use 'addAxis'.
Method setGraph
is only valid for Gantt Charts.
'addSubData' allows to add subdata for a chart with drilldown.
In this case, categoryIDs indicates corresponding indice(s)
of the dataProvider
where to add the data.
For method addValueAxis
: valueAxis is optional. Method addValueAxes
is deprecated.
Method setValueAxis
is only valid for Gantt charts.
(updated) AmChart with given properties.
Refer to http://docs.amcharts.com/3/javascriptcharts/.
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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | new("AmChart", valueField = "value", theme = "patterns")
amChart(type = "pie")
amAngularGaugeChart()
amFunnelChart(marginLeft = 15)
amRadarChart()
amSerialChart(creditsPostion = "top-right")
amPieChart()
amGanttChart(segmentsField = "segments")
amXYChart()
allLabels <- list(label(text = "balloonText"), label(text = "column"))
amSerialChart(allLabels = allLabels)
# ---
addLabel(.Object = amSerialChart(), text = "balloonText")
# equivalent to:
label_obj <- label(text = "balloonText")
addLabel(.Object = amSerialChart(), label = label_obj)
# ---
arrows_ls <- list(gaugeArrow(value = 130), gaugeArrow(value = 150))
amAngularGaugeChart(arrows = arrows_ls)
# ---
chart <- addArrow(.Object = amAngularGaugeChart(), value = 10); print(chart)
# equivalent to:
gaugeArrow_obj <- gaugeArrow(value = 10)
addArrow(.Object = amAngularGaugeChart(), arrow = gaugeArrow_obj)
# ---
axes_ls <- list(gaugeAxis(value = 130), gaugeAxis(value = 150))
setAxes(.Object = amAngularGaugeChart(), axes = axes_ls)
# If possible, simplify your code by using the constructor:
amAngularGaugeChart(axes = axes_ls)
# ---
addAxis(.Object = amAngularGaugeChart(), startValue = 0, endValue = 100, valueInterval = 10)
# equivalent to:
gaugeAxis_obj <- gaugeAxis(startValue = 0, enValue = 100, valueInterval = 10)
addAxis(.Object = amAngularGaugeChart(), axis = gaugeAxis_obj)
# ---
setBalloon(.Object = amSerialChart(), adjustBorderColor = TRUE, fillColor = "#FFFFFF",
color = "#000000", cornerRadius = 5)
# equivalent to:
amBalloon_obj <- amBalloon(adjustBorderColor = TRUE, fillColor = "#FFFFFF",
color = "#000000", cornerRadius = 5)
setBalloon(.Object = amSerialChart(), amBalloon = amBalloon_obj)
# ---
setCategoryAxis(.Object = amSerialChart(), gridPosition = "start")
# equivalent to:
categoryAxis_obj <- categoryAxis(gridPosition = "start")
setCategoryAxis(.Object = amSerialChart(), categoryAxis = categoryAxis_obj)
# ---
setCategoryField(.Object = amSerialChart(), categoryField = "country")
# ---
# with default value, no argument needed
setChartCursor(.Object = amSerialChart())
# other example
setChartCursor(.Object = amSerialChart(), oneBallOnly = TRUE)
# equivalent to
chartCursor_obj <- chartCursor(oneBallOnly = TRUE)
setChartCursor(.Object = amSerialChart(), chartCursor = chartCursor_obj)
# ---
# Add the default scrollbar
setChartScrollbar(.Object = amSerialChart())
# equivalent to:
chartScrollbar_obj <- chartScrollbar(updateOnReleaseOnly = FALSE)
setChartScrollbar(.Object = amSerialChart(), chartScrollbar = chartScrollbar_obj)
# ---
setCreditsPosition(.Object = amPieChart(), creditsPosition = "top-right")
# ---
setDataLoader(.Object = amSerialChart(), url = "data.json", format = "json")
# ---
dataProvider_obj <- data.frame(key = c("FR", "US", "GER", "ENG", "IT" ),
value = round(runif(5, max = 100)))
setDataProvider(.Object = amPieChart(), dataProvider = dataProvider_obj)
# ---
graphs_ls <- list(graph(balloonText = "balloonText"), graph(type = "column"))
setGraphs(.Object = amSerialChart(), graphs = graphs_ls)
# ---
addGraph(.Object = amSerialChart(), balloonText = "balloonText", "type" = "column")
# equivalent to
amGraph_obj <- amGraph(balloonText = "balloonText", "type" = "column")
addGraph(.Object = amSerialChart(), amGraph = amGraph_obj)
# ---
print(setGraph(.Object = amGanttChart(), id = "amGraph-1"))
# equivalent to:
amGraph_obj <- amGraph(id = "amGraph-1")
setGraph(.Object = amGanttChart(), amGraph = amGraph_obj)
# ---
guides_ls <- list(guide(fillAlpha = .1), guide(fillAlpha = .5))
amSerialChart(guides = guides_ls)
# ---
chart <- addGuide(.Object = amSerialChart(), fillAlpha = .1, value = 0, toVAlue = 10)
print(chart)
# equivalent to
guide_obj <- guide(fillAlpha = .1, value = 0, toValue = 10, valueAxis = "1")
addGuide(.Object = amSerialChart(), guide = guide_obj)
setLegend(.Object = amChart(), amLegend = amLegend(useGraphSettings = TRUE))
# equivalent to:
setLegend(.Object = amChart(), useGraphSettings = TRUE)
# ---
pipeR::pipeline(
amGanttChart(segmentsField = "segments"),
setDataProvider(data.frame(category = c( "John", "Julia"))),
addSegment(1, data.frame(start = 7, duration = 2:3, task = c("Task #1", "Task #2"))),
addSegment(2, data.frame(start = 10, duration = 2:3, task = c("Task #1", "Task #2")))
)
# ---
ls <- list(data.frame(start = 7, duration = 2:3, task = c("Task #1", "Task #2")),
data.frame(start = 10, duration = 2:3, task = c("Task #1", "Task #2")))
pipeR::pipeline(
amGanttChart(segmentsField = "segments"),
setDataProvider(data.frame(category = c( "John", "Julia"))),
addSegment(1:2, ls)
)
# ---
amChart_obj <- amChart(dataProvider = data.frame(a = 1:5, b = 6:10))
addSubData(.Object = amChart_obj, categoryIDs = 3, data = data.frame(a = 1:10, b = 11:20))
# ---
setSubChartProperties(.Object = amSerialChart(), type = "serial")
# ---
setTheme(.Object = amPieChart(), theme = "dark")
# ---
titles_ls <- list(amTitle(text = "balloonText"), amTitle(text = "column"))
setTitles(.Object = amXYChart(), titles = titles_ls)
# or...
amXYChart(titles = titles_ls)
# ---
addTitle(.Object = amPieChart(), text = "balloonText", size = 15)
# equivalent to
title_obj <- amTitle(text = "balloonText", size = 15)
addTitle(.Object = amPieChart(), title = title_obj)
# ---
trendLines <- list(trendLine(initialValue = 1, finalValue = 5),
trendLine(initialValue = 7, finalValue = 19))
setTrendLines(.Object = amSerialChart(), trendLines = trendLines)
# or...
amSerialChart(trendLines = trendLines) # Equivalent
# ---
addTrendLine(.Object = amSerialChart(), initialValue = 1, initialXValue = 1,
finalValue = 11, finalXValue = 12)
# equivalent to:
trendLine_obj <- trendLine(initialValue = 1, initialXValue = 1, finalValue = 11, finalXValue = 12)
chart <- addTrendLine(.Object = amSerialChart(), trendLine = trendLine_obj); print(chart)
# ---
setType(.Object = amChart(), type = "pie")
# equivalent to:
amPieChart()
valueAxes <- list(valueAxis(axisTitleOffset = 12, tickLength = 10),
valueAxis(axisTitleOffset = 10, tickLength = 10))
setValueAxes(.Object = amSerialChart(), valueAxes = valueAxes)
# or...
amSerialChart(valueAxes = valueAxes)
# ---
print(addValueAxis(.Object = amSerialChart(), axisTitleOffset = 12, tickLength = 10, title = "foo"))
# equivalent to:
valueAxis_obj <- valueAxis(axisTitleOffset = 12, tickLength = 10, title = "foo")
addValueAxis(.Object = amSerialChart(), valueAxis = valueAxis_obj)
# ---
setValueAxis(.Object = amGanttChart())
setValueAxis(.Object = amGanttChart(), type = "date")
valueScrollbar_obj <- chartScrollbar(updateOnReleaseOnly = FALSE)
chart <- setValueScrollbar(.Object = amSerialChart(), valueScrollbar = valueScrollbar_obj)
print(chart)
# or...
amSerialChart(updateOnReleaseOnly = FALSE)
# ---
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.