AmStockChart: Initializes an AmStockChart

Description Usage Arguments Details Value Examples

Description

Method to initialize any S4 class provided by the package.

Usage

  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
## S4 method for signature 'AmStockChart'
initialize(
  .Object,
  balloon,
  comparedDataSets,
  dataSets,
  dataSetSelector,
  mainDataSet,
  panels,
  periodSelector,
  theme,
  group,
  is_ts_module,
  ...
)

amStockChart(
  balloon,
  comparedDataSets,
  dataSets,
  dataSetSelector,
  mainDataSet,
  panels,
  periodSelector,
  theme,
  group,
  is_ts_module,
  ...
)

## S4 method for signature 'AmStockChart,AmBalloonOrMissing'
setBalloon(.Object, amBalloon = NULL, ...)

setCategoryAxesSettings(.Object, ...)

## S4 method for signature 'AmStockChart'
setCategoryAxesSettings(.Object, ...)

setChartCursorSettings(.Object, ...)

## S4 method for signature 'AmStockChart'
setChartCursorSettings(.Object, ...)

setChartScrollbarSettings(.Object, chartScrollbarSettings = NULL, ...)

## S4 method for signature 'AmStockChart,ChartScrollbarOrMissing'
setChartScrollbarSettings(.Object, chartScrollbarSettings = NULL, ...)

setComparedDataSets(.Object, comparedDataSets)

## S4 method for signature 'AmStockChart'
setComparedDataSets(.Object, comparedDataSets)

addComparedDataSet(.Object, dataSet = NULL, ...)

## S4 method for signature 'AmStockChart,DataSetOrMissing'
addComparedDataSet(.Object, dataSet = NULL, ...)

setDataSets(.Object, dataSets)

## S4 method for signature 'AmStockChart'
setDataSets(.Object, dataSets)

addDataSet(.Object, dataSet = NULL, ...)

## S4 method for signature 'AmStockChart,DataSetOrMissing'
addDataSet(.Object, dataSet = NULL, ...)

setDataSetSelector(.Object, dataSetSelector = NULL, ...)

## S4 method for signature 'AmStockChart'
setDataSetSelector(.Object, dataSetSelector = NULL, ...)

setLegendSettings(.Object, ...)

## S4 method for signature 'AmStockChart'
setLegendSettings(.Object, ...)

setMainDataSet(.Object, dataSet = NULL, ...)

## S4 method for signature 'AmStockChart,DataSetOrMissing'
setMainDataSet(.Object, dataSet = NULL, ...)

setPanels(.Object, panels)

## S4 method for signature 'AmStockChart,list'
setPanels(.Object, panels)

addPanel(.Object, panel = NULL, ...)

## S4 method for signature 'AmStockChart,StockPanelOrMissing'
addPanel(.Object, panel = NULL, ...)

setPanelsSettings(.Object, ...)

## S4 method for signature 'AmStockChart'
setPanelsSettings(.Object, ...)

setPeriodSelector(.Object, periodSelector = NULL, ...)

## S4 method for signature 'AmStockChart,PeriodSelectorOrMissing'
setPeriodSelector(.Object, periodSelector = NULL, ...)

setStockEventsSettings(.Object, ...)

## S4 method for signature 'AmStockChart'
setStockEventsSettings(.Object, ...)

setValueAxesSettings(.Object, ...)

## S4 method for signature 'AmStockChart'
setValueAxesSettings(.Object, ...)

Arguments

.Object

AmStockChart.

balloon

AmBalloon.

comparedDataSets

list of DataSet. Properties of data sets selected for comparing.

dataSets

list of DataSet. Each element must be a list of DataSet properties.

dataSetSelector

list of DataSetSelector. You can add it if you have more than one data set and want users to be able to select/compare them.

mainDataSet

DataSet. Data set selected as main.

panels

list of StockPanel.

periodSelector

PeriodSelector. You can add it if you want user's to be able to enter date ranges or zoom chart with predefined period buttons.

theme

character.

group

character for synchronization

is_ts_module

boolean. Don't use. For rAmChartsTimeSeriesUI

...

other properties of AmStockChart.

amBalloon

AmBalloon. Argument for method setBalloon.

chartScrollbarSettings

ChartScrollbar. If you change a property after the chart is initialized, you should call stockChart.validateNow() method in order for it to work. If there is no default value specified, default value of ChartScrollbar class will be used.

dataSet

DataSet.

panel

StockPanel.

Details

CategoryAxesSettings sets common settings for all CategoryAxes of StockPanels. If you change a property after the chart is initialized, you should call stockChart.validateNow() method. If there is no specified value, default value of CategoryAxis class will be used. you should get this axis from the chart and set properties to this object.

ChartCursorSettings sets settings for chart cursor. If you change a property after the chart is initialized, you should call stockChart.validateNow() method. If there is no specified value, default value of ChartCursor class will be used.

You can add it if you have more than one data set and want users to be able to select/compare them.

Value

An object of class AmStockChart.

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
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
# --- method 'initialize'
new("AmStockChart", theme = "dark")



# --- constructor
amStockChart()

library(pipeR)


# Dummy example
amStockChart() 


# Dummy example
setCategoryAxesSettings(.Object = amStockChart(), gridPosition = "start")


# Dummy example
setChartCursorSettings(.Object = amStockChart(), oneBallOnly = TRUE)


# Dummy example
amchart <- setChartScrollbarSettings(.Object = amStockChart(), enabled = TRUE)
print(amchart)

# equivalent to:
chartScrollbarSettings_obj <- chartScrollbarSettings()
setChartScrollbarSettings(.Object = amStockChart(),
                          chartScrollbarSettings = chartScrollbarSettings_obj)


# Dummy example
comparedDataSets_ls <- list(dataSet(compared = TRUE), dataSet(compared = TRUE))
setComparedDataSets(.Object = amStockChart(), comparedDataSets = comparedDataSets_ls)


# Dummy example
addComparedDataSet(.Object = amStockChart(), compared = TRUE)


# Dummy example
dataSets_ls <- list(dataSet(compared = FALSE), dataSet(compared = FALSE))
setDataSets(.Object = amStockChart(), dataSets = dataSets_ls)


# Dummy example
addDataSet(.Object = amStockChart(), compared = FALSE)
# equivalent to:
dataSet_obj <- dataSet(compared = FALSE)
addDataSet(.Object = amStockChart(), dataSet = dataSet_obj)


# Dummy example
print(setDataSetSelector(.Object = amStockChart(), width = 180))

# equivalent to:
dataSetSelector_obj <- dataSetSelector(width = 180)
print(setDataSetSelector(.Object = amStockChart(),
                         dataSetSelector = dataSetSelector_obj))


# Dummy example
setLegendSettings(.Object = amStockChart(), equalWidths = TRUE)


# Dummy example
setMainDataSet(.Object = amStockChart(), showInCompare = TRUE)


# Dummy example
panels_ls <- list(stockPanel(compared = TRUE), stockPanel(compared = TRUE))
setPanels(.Object = amStockChart(), panels = panels_ls)


# Dummy example
chart <- addPanel(.Object = amStockChart(), allowTurningOff = TRUE); print(chart)
# equivalent to:
panel_obj <- panel(allowTurningOff = TRUE)
addPanel(.Object = amStockChart(), panel = panel_obj)


# Dummy example
setPanelsSettings(.Object = amStockChart(), backgroundAlpha = 0)


# Dummy example
setPeriodSelector(.Object = amStockChart(), dateFormat = "DD-MM-YYYY")


# Dummy example
setStockEventsSettings(.Object = amStockChart(), backgroundAlpha = 1)


# Dummy example
setValueAxesSettings(.Object = amStockChart(), autoGridCount = "TRUE")

rAmCharts documentation built on Dec. 6, 2019, 5:11 p.m.