initialize-ChartScrollbar: Initializes a ChartScrollbar

Description Usage Arguments Examples

Description

ChartScrollbarSettings sets settings for chart scrollbar. If you change a property after the chart is initialized, you should call stockChart.validateNow() method. If there is no default value specified, default value of ChartScrollbar class will be used. Run api("ChartScrollbarSettings") for more informations.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## S4 method for signature 'ChartScrollbar'
initialize(.Object, graph, enabled, ...)

chartScrollbar(graph, enabled = TRUE, ...)

chartScrollbarSettings(graph, enabled = TRUE, ...)

## S4 method for signature 'ChartScrollbar,AmGraphOrCharacterOrMissing'
setGraph(.Object, graph = NULL, ...)

setEnabled(.Object, enabled)

## S4 method for signature 'ChartScrollbar,logical'
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 when user releases mouse button.

...

other properties of ChartScrollbar. Run : api("ChartScrollbar") for more information.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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)

Example output

Important changes: constructors legend() and title() have been replaced by amLegend() and amTitle().
For any bug report or feed back see https://github.com/datastorm-open/rAmCharts
~ ChartScrollbar ~
$graph
[1] "g1"

~ ChartScrollbar ~
$graph
$graph$animationPlayed
[1] FALSE

$graph$test
[1] 1


~ ChartScrollbar ~
$enabled
[1] TRUE

~ ChartScrollbar ~
$enabled
[1] TRUE

~ ChartScrollbar ~
$enabled
[1] TRUE

~ ChartScrollbar ~
$enabled
[1] TRUE

default graph added to chartScrollbar
~ ChartScrollbar ~
$graph
$graph$animationPlayed
[1] FALSE

$graph$balloonText
[1] "[[value]]"


$enabled
[1] TRUE

~ ChartScrollbar ~
$graph
$graph$animationPlayed
[1] FALSE

$graph$id
[1] "graph1"

$graph$balloonText
[1] "performance"


$enabled
[1] TRUE

~ ChartScrollbar ~
$graph
$graph$animationPlayed
[1] FALSE

$graph$id
[1] "graph1"

$graph$balloonText
[1] "performance"


$enabled
[1] TRUE

~ ChartScrollbar ~
$graph
[1] "graph1"

$enabled
[1] TRUE

~ ChartScrollbar ~
$enabled
[1] TRUE

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