Namespace for functionality related to comparison series.
Members
-
initialPrice :number|string
-
For relative comparisons, this is the starting (baseline) point.
Valid options are:
- A number to specify an absolute amount to be used as the starting value for all percentage changes.
- A string containing the symbol of an existing series to be used as the starting value for the comparisons (for instance "IBM"). Computations will then be based on the change from the first visible bar value for the selected symbol.
- An empty string will compare against the baseline value of the main series (same as in "percent" scale).
See CIQ.ChartEngine#setChartScale for more details.
Type:
- number | string
- Since:
-
5.1.0
- Default Value:
-
- 100
Methods
-
netChangeToPrice(stx, chart, netChange [, yAxis] [, field])
-
Untransform function for net change charting
Parameters:
Name Type Argument Description stxCIQ.ChartEngine The charting object
chartCIQ.ChartEngine.Chart The specific chart
netChangenumber The price to untransform
yAxisCIQ.ChartEngine.YAxis <optional>
Axis where price is to be found
fieldstring <optional>
Field whose price needs converting, otherwise the main series is converted
- Since:
-
9.6.0
Returns:
The untransformed price
- Type
- number
-
percentToPrice(stx, chart, percent [, yAxis] [, field])
-
Untransform function for percent comparison charting
Parameters:
Name Type Argument Description stxCIQ.ChartEngine The charting object
chartCIQ.ChartEngine.Chart The specific chart
percentnumber The price to untransform
yAxisCIQ.ChartEngine.YAxis <optional>
Axis where price is to be found
fieldstring <optional>
Field whose price needs converting, otherwise the main series is converted
- Since:
-
8.4.0 Added
yAxisandfieldparameters. Can now untransform a series price, provided the series name is set in thefieldparameter.
Returns:
The untransformed price
- Type
- number
-
priceFormat(stx, panel, price)
-
Formats the percentage values on the comparison chart
Parameters:
Name Type Description stxCIQ.ChartEngine The chart object
panelCIQ.ChartEngine.Panel The panel
pricenumber The raw percentage as a decimal
Returns:
The percentage formatted as a percent (possibly using localization if set in stx)
- Type
- string
-
priceToNetChange(stx, chart, price [, yAxis] [, field])
-
Transform function for net change charting
Parameters:
Name Type Argument Description stxCIQ.ChartEngine The charting object
chartCIQ.ChartEngine.Chart The specific chart
pricenumber The price to transform
yAxisCIQ.ChartEngine.YAxis <optional>
Axis where price is to be found
fieldstring <optional>
Field whose price needs converting, otherwise the main series is converted
- Since:
-
9.6.0
Returns:
The transformed price (into percentage)
- Type
- number
-
priceToPercent(stx, chart, price [, yAxis] [, field])
-
Transform function for percent comparison charting
Parameters:
Name Type Argument Description stxCIQ.ChartEngine The charting object
chartCIQ.ChartEngine.Chart The specific chart
pricenumber The price to transform
yAxisCIQ.ChartEngine.YAxis <optional>
Axis where price is to be found
fieldstring <optional>
Field whose price needs converting, otherwise the main series is converted
- Since:
-
8.4.0 Added
yAxisandfieldparameters. Can now transform a series price, provided the series name is set in thefieldparameter.
Returns:
The transformed price (into percentage)
- Type
- number
-
priceToRelative(stx, chart, price [, yAxis] [, field])
-
Transform function for relative comparison charting
Parameters:
Name Type Argument Description stxCIQ.ChartEngine The charting object
chartCIQ.ChartEngine.Chart The specific chart
pricenumber The price to transform
yAxisCIQ.ChartEngine.YAxis <optional>
Axis where price is to be found
fieldstring <optional>
Field whose price needs converting, otherwise the main series is converted
- Since:
-
- 5.1.0
- 8.4.0 Added
yAxisandfieldparameters. Can now transform a series price, provided the series name is set in thefieldparameter.
Returns:
The transformed price (relative to CIQ.Comparison.initialPrice)
- Type
- number
-
relativeToPrice(stx, chart, relative [, yAxis] [, field])
-
Untransform function for relative comparison charting
Parameters:
Name Type Argument Description stxCIQ.ChartEngine The charting object
chartCIQ.ChartEngine.Chart The specific chart
relativenumber The price to untransform
yAxisCIQ.ChartEngine.YAxis <optional>
Axis where price is to be found
fieldstring <optional>
Field whose price needs converting, otherwise the main series is converted
- Since:
-
- 5.1.0
- 8.4.0 Added
yAxisandfieldparameters. Can now transform a series price, provided the series name is set in thefieldparameter.
Returns:
The untransformed price
- Type
- number
