rAmCharts (version 1.1.2)

initialize,ChartScrollbar-method: Initialize a ChartScrollbar

Description

Initialize a ChartScrollbar

ChartScrollbarSettings settings set's settings for chart scrollbar. 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. Run api("ChartScrollbarSettings") for more information.

Usage

"initialize"(.Object, graph, enabled, ...)
chartScrollbar(graph, enabled = TRUE, ...)
chartScrollbarSettings(graph, enabled = TRUE, ...)
"setGraph"(.Object, graph = NULL, ...)
setEnabled(.Object, enabled)
"setEnabled"(.Object, enabled)

Arguments

.Object
ChartScrollbar.
graph
AmGraph. Specifies which graph will be displayed in the scrollbar.
enabled
logical. Specifies if the chart should be updated while dragging/resizing the scrollbar or only at the moment when user releases mouse button.

Functions

  • chartScrollbar:
  • chartScrollbarSettings:

Examples

Run this code
new("ChartScrollbar", graph = "g1")
new("ChartScrollbar", graph = amGraph(test = 1))
chartScrollbar()
chartScrollbar(enabled = TRUE)
chartScrollbar()
chartScrollbar(enabled = TRUE)
# chartScrollbar with default graph
setGraph(.Object = chartScrollbar())

# example with arguments
setGraph(.Object = chartScrollbar(), id = "graph1", balloonText = "performance")
# equivalent to:
graph_obj <- amGraph(id = "graph1", balloonText = "performance")
(chartScrollbar_obj <- setGraph(.Object = chartScrollbar(), graph = graph_obj))
# or, iff graph_obj has alreadey been added to the chart:
setGraph(.Object = chartScrollbar(), graph = "graph1")

# ---
setEnabled(.Object = chartScrollbar(), enabled = TRUE)

Run the code above in your browser using DataCamp Workspace