Learn R Programming

rAmCharts (version 1.1.1)

initialize,TrendLine-method: Initialize a TrendLine

Description

Initialize a TrendLine

Usage

## S3 method for class 'TrendLine':
initialize(.Object, initialValue, initialXValue,
  finalValue, finalXValue, valueAxis, valueAxisX, ...)

trendLine(.Object, initialValue, initialXValue, finalValue, finalXValue, valueAxis, valueAxisX, ...)

setInitialValue(.Object, initialValue)

## S3 method for class 'TrendLine,numeric': setInitialValue(.Object, initialValue)

setInitialXValue(.Object, initialXValue)

## S3 method for class 'TrendLine,numeric': setInitialXValue(.Object, initialXValue)

setFinalValue(.Object, finalValue)

## S3 method for class 'TrendLine,numeric': setFinalValue(.Object, finalValue)

setFinalXValue(.Object, finalXValue)

## S3 method for class 'TrendLine,numeric': setFinalXValue(.Object, finalXValue)

## S3 method for class 'TrendLine': setValueAxis(.Object, valueAxis = NULL, ...)

setValueAxisX(.Object, valueAxisX = NULL, ...)

## S3 method for class 'TrendLine': setValueAxisX(.Object, valueAxisX = NULL, ...)

Arguments

.Object
TrendLine.
initialValue
numeric. Value from which trend line should start.
initialXValue
numeric. Used by XY chart only. X value from which trend line should start.
finalValue
numeric. Value at which trend line should end.
finalXValue
numeric. Used by XY chart only. X value at which trend line should end.
valueAxis
ValueAxis. Value axis of the trend line. Will use first value axis of the chart if not set any. You can use a reference to the value axis object or id of value axis.
valueAxisX
ValueAxis. Used by XY chart only. X axis of trend line. Will use first X axis of the chart if not set any. You can use a reference to the value axis object or id of value axis.
...
Other properties.

Functions

  • trendLine:

Examples

Run this code
new("TrendLine", initialValue = 1, finalValue = 11)

# Other example
valueAxis <- valueAxis(title = "Hello !", axisTitleOffset = 12)
new("TrendLine", valueAxis = valueAxis)
trendLine(initialValue = 1, finalValue = 11)
setInitialValue(.Object = trendLine(), initialValue = 16)
setInitialXValue(.Object = trendLine(), initialXValue = 16)
setFinalValue(.Object = trendLine(), finalValue = 16)
setFinalXValue(.Object = trendLine(), finalXValue = 16)
setValueAxis(trendLine(), valueAxis(title = "Hello !", axisTitleOffset = 12))
setValueAxis(trendLine(), title = "Hello !", axisTitleOffset = 12)
setValueAxisX(.Object = trendLine(), title = "Hello !", axisTitleOffset = 12)
valueAxis <- valueAxis(title = "Hello !", axisTitleOffset = 12)
trendLine(valueAxis = valueAxis)

Run the code above in your browser using DataLab