Learn R Programming

rAmCharts (version 1.1.1)

initialize,AmChart-method: Create an AmChart

Description

Method for initializing any S4 class provided by the package.

Usage

## S3 method for class 'AmChart':
initialize(.Object, allLabels, arrows, axes, balloon,
  categoryAxis, categoryField, chartCursor, chartScrollbar, creditsPosition,
  dataProvider, graphs, graph, guides, legend, segmentsField, theme, titles,
  trendLines, type, valueAxes, valueAxis,
  pathToImages = "http://www.amcharts.com/lib/3/images/", ...)

amChart(allLabels, arrows, axes, balloon, categoryAxis, categoryField, chartCursor, chartScrollbar, creditsPosition, dataProvider, graph, graphs, guides, legend, segmentsField, theme, titles, trendLines, type, valueAxes, valueAxis, pathToImages = "http://www.amcharts.com/lib/3/images/", ...)

amAngularGaugeChart(arrows, titles, axes, ...)

amFunnelChart(dataProvider, ...)

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, ...)

Arguments

.Object
AmChart
allLabels
list. List of Labels.
arrows
list containing object of class GaugeArrow.
axes
list of GaugeAxis.
balloon
list of AmBalloon. Creates the balloons (tooltips) of the chart, It follows the mouse cursor when you roll-over the data items. The framework generates the instances automatically you only need to adjust the appeara
categoryAxis
list of 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.
categoryField
character. Category field name tells the chart the name of the field in your dataProvider object which will be used for category axis values.
chartCursor
ChartCursor.
chartScrollbar
ChartScrollbar. Properties of chart's scrollbar.
creditsPosition
character, specifying position of link to amCharts site. Allowed values are: top-left, top-right, bottom-left and bottom-right.
dataProvider
list, containing the data. Use providing method toList* to convert a data.frame.
graphs
list of AmGraph Creates the visualization of the data in following types: line, column, step line, smoothed line, olhc and candlestick.
graph
code{AmGraph}. Graph of a Gantt chart. 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.
guides
list of Guide.
legend
AmLegend. Properties of chart's legend.
segmentsField
character.
theme
character. Theme of a chart. Config files of themes can be found in amcharts/themes/ folder.
titles
list of Title.
trendLines
list of TrendLine. You can add trend lines to a chart using this list or access already existing trend lines.
type
character. Possible types are: serial, pie, radar, (types xy, radar, funnel, gauge, map, stock. are in development).
valueAxes
list of ValueAxis properties. Chart creates one value axis automatically, so if you need only one value axis, you don't need to create it.
valueAxis
ValueAxis for Gantt chart. Set it's type to "date" if your data is date or time based. In case of Value axis for a Gantt chart. Set it's type to "date" if your data is date or time based.
pathToImages
character
...
Other properties of AmChart. See http://docs.amcharts.com/3/javascriptstockchart/AmChart.

Value

  • Returns an object of class AmChart with arguments.

Functions

  • amChart:
  • amAngularGaugeChart:
  • amFunnelChart:
  • amRadarChart:
  • amSerialChart:
  • amPieChart:
  • amGanttChart:
  • amXYChart:

Details

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

See Also

AmChart S4 class

Examples

Run this code
new("AmChart", valueField = "value")
amChart(type = "pie")
amAngularGaugeChart()
amFunnelChart(marginLeft = 15)
amRadarChart()
amSerialChart(creditsPostion = "top-right")
amPieChart()
amGanttChart(segmentsField = "segments")
amXYChart()

Run the code above in your browser using DataLab