rAmCharts (version 1.1.2)

initialize,StockPanel-method: Initialize a StockPanel

Description

Initialize a StockPanel

Usage

"initialize"(.Object, drawOnAxis, stockGraphs, stockLegend, ...)
stockPanel(drawOnAxis, stockGraphs, stockLegend, ...)
panel(drawOnAxis, stockGraphs, stockLegend, ...)
setDrawOnAxis(.Object, valueAxis = NULL, ...)
"setDrawOnAxis"(.Object, valueAxis = NULL, ...)
setStockGraphs(.Object, stockGraphs)
"setStockGraphs"(.Object, stockGraphs)
addStockGraph(.Object, stockGraph = NULL, ...)
"addStockGraph"(.Object, stockGraph = NULL, ...)
setStockLegend(.Object, stockLegend = NULL, ...)
"setStockLegend"(.Object, stockLegend = NULL, ...)

Arguments

.Object
StockPanel.
drawOnAxis
ValueAxis. Specifies on which value axis user can draw trend lines. Set drawingIconsEnabled to true if you want drawing icons to be visible. First value axis will be used if not set here. You can use a reference to the value axis object or id of value axis.
stockGraphs
list of AmGraph. Each element must be have been created with stockGraph(*)
stockLegend
list of AmLegend. Each element must be have been created with stockLegend(*)
...
Other properties...
valueAxis
(optional) ValueAxis. Argument for method setDrawOnAxis.
stockGraph
AmGraph, created with stockGraph(...). Argument for method addStockGraph.

Value

(updated) StockPanel with given properties.

Functions

  • stockPanel:
  • panel:

Examples

Run this code
new("StockPanel")
stockPanel()
panel()
valueAxis_obj <- valueAxis(id = "valueAxis1")
setDrawOnAxis(.Object = stockPanel(), valueAxis = valueAxis_obj)
setDrawOnAxis(.Object = stockPanel(), valueAxis = "valueAxis1")
# ---
stockGraphs <- list(stockGraph(comparable = TRUE), stockGraph(comparable = FALSE))
setStockGraphs(.Object =  stockPanel(), stockGraphs = stockGraphs)
stockPanel(stockGraphs = stockGraphs)
# ---
addStockGraph(.Object = stockPanel(), comparable = FALSE)
addStockGraph(.Object = stockPanel(), stockGraph = stockGraph(comparable = FALSE))
# ---
setStockLegend(.Object = stockPanel(), valueTextRegular = "[[value]]")
# equivalent to:
stockLegend_obj <- stockLegend(valueTextRegular = "[[value]]")
setStockLegend(.Object = stockPanel(), stockLegend = stockLegend_obj)
# ---

Run the code above in your browser using DataLab