TrendLine: Initializes a TrendLine

initialize,TrendLine-methodR Documentation

Initializes a TrendLine

Description

Uses the constructor to create the object or update an existing one with the setters.

Usage

## S4 method for signature 'TrendLine'
initialize(
  .Object,
  initialValue,
  initialXValue,
  finalValue,
  finalXValue,
  valueAxis,
  valueAxisX,
  ...
)

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

setInitialValue(.Object, initialValue)

## S4 method for signature 'TrendLine,numeric'
setInitialValue(.Object, initialValue)

setInitialXValue(.Object, initialXValue)

## S4 method for signature 'TrendLine,numeric'
setInitialXValue(.Object, initialXValue)

setFinalValue(.Object, finalValue)

## S4 method for signature 'TrendLine,numeric'
setFinalValue(.Object, finalValue)

setFinalXValue(.Object, finalXValue)

## S4 method for signature 'TrendLine,numeric'
setFinalXValue(.Object, finalXValue)

## S4 method for signature 'TrendLine,ValueAxisOrCharacterOrMissing'
setValueAxis(.Object, valueAxis = NULL, ...)

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

## S4 method for signature 'TrendLine,ValueAxisOrCharacterOrMissing'
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 of TrendLine.

Value

(possibly updated) .Object of class TrendLine.

Examples

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(.Object = trendLine(), id = "valueAxis-1",
             title = "Hello !", axisTitleOffset = 12)
# equival to:
valueAxis_obj <- valueAxis(id = "valueAxis-1", title = "Hello !", axisTitleOffset = 12)
trendLine(valueAxis = valueAxis_obj)
# or...
trendLine(valueAxis = "valueAxis-1")
# valid if and only if 'valueAxis_obj' has already been added to the chart

setValueAxisX(.Object = trendLine(), id = "valueAxisX-1",
              title = "Hello !", axisTitleOffset = 12)
# equival to:
valueAxisX_obj <- valueAxis(id = "valueAxisX-1", title = "Hello !", axisTitleOffset = 12)
trendLine(valueAxisX = valueAxisX_obj)
# or...
trendLine(valueAxisX = "valueAxisX-1")
# valid if and only if 'valueAxisX_obj' has already been added to the chart


DataKnowledge/rAmCharts documentation built on Oct. 3, 2022, 5:42 a.m.