initialize,AmStockChart-method {rAmCharts} | R Documentation |
Initializes an AmStockChart
Description
Method to initialize any S4 class provided by the package.
Usage
## 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 |
|
balloon |
|
comparedDataSets |
|
dataSets |
|
dataSetSelector |
|
mainDataSet |
DataSet. Data set selected as main. |
panels |
|
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 |
|
group |
|
is_ts_module |
|
... |
other properties of AmStockChart. |
amBalloon |
AmBalloon.
Argument for method |
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 |
|
panel |
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
## Not run:
# --- method 'initialize'
new("AmStockChart", theme = "dark")
## End(Not run)
## Not run:
# --- constructor
amStockChart()
## End(Not run)
library(pipeR)
## Not run:
# Dummy example
amStockChart() %>>% setBalloon(gridPosition = "start")
## End(Not run)
## Not run:
# Dummy example
setCategoryAxesSettings(.Object = amStockChart(), gridPosition = "start")
## End(Not run)
## Not run:
# Dummy example
setChartCursorSettings(.Object = amStockChart(), oneBallOnly = TRUE)
## End(Not run)
## Not run:
# Dummy example
amchart <- setChartScrollbarSettings(.Object = amStockChart(), enabled = TRUE)
print(amchart)
# equivalent to:
chartScrollbarSettings_obj <- chartScrollbarSettings()
setChartScrollbarSettings(.Object = amStockChart(),
chartScrollbarSettings = chartScrollbarSettings_obj)
## End(Not run)
## Not run:
# Dummy example
comparedDataSets_ls <- list(dataSet(compared = TRUE), dataSet(compared = TRUE))
setComparedDataSets(.Object = amStockChart(), comparedDataSets = comparedDataSets_ls)
## End(Not run)
## Not run:
# Dummy example
addComparedDataSet(.Object = amStockChart(), compared = TRUE)
## End(Not run)
## Not run:
# Dummy example
dataSets_ls <- list(dataSet(compared = FALSE), dataSet(compared = FALSE))
setDataSets(.Object = amStockChart(), dataSets = dataSets_ls)
## End(Not run)
## Not run:
# Dummy example
addDataSet(.Object = amStockChart(), compared = FALSE)
# equivalent to:
dataSet_obj <- dataSet(compared = FALSE)
addDataSet(.Object = amStockChart(), dataSet = dataSet_obj)
## End(Not run)
## Not run:
# Dummy example
print(setDataSetSelector(.Object = amStockChart(), width = 180))
# equivalent to:
dataSetSelector_obj <- dataSetSelector(width = 180)
print(setDataSetSelector(.Object = amStockChart(),
dataSetSelector = dataSetSelector_obj))
## End(Not run)
## Not run:
# Dummy example
setLegendSettings(.Object = amStockChart(), equalWidths = TRUE)
## End(Not run)
## Not run:
# Dummy example
setMainDataSet(.Object = amStockChart(), showInCompare = TRUE)
## End(Not run)
## Not run:
# Dummy example
panels_ls <- list(stockPanel(compared = TRUE), stockPanel(compared = TRUE))
setPanels(.Object = amStockChart(), panels = panels_ls)
## End(Not run)
## Not run:
# Dummy example
chart <- addPanel(.Object = amStockChart(), allowTurningOff = TRUE); print(chart)
# equivalent to:
panel_obj <- panel(allowTurningOff = TRUE)
addPanel(.Object = amStockChart(), panel = panel_obj)
## End(Not run)
## Not run:
# Dummy example
setPanelsSettings(.Object = amStockChart(), backgroundAlpha = 0)
## End(Not run)
## Not run:
# Dummy example
setPeriodSelector(.Object = amStockChart(), dateFormat = "DD-MM-YYYY")
## End(Not run)
## Not run:
# Dummy example
setStockEventsSettings(.Object = amStockChart(), backgroundAlpha = 1)
## End(Not run)
## Not run:
# Dummy example
setValueAxesSettings(.Object = amStockChart(), autoGridCount = "TRUE")
## End(Not run)