The UI portion of this namespace is maintained for legacy implementations only (not using web components). New implementations should use functionality included in the web components (stxUI.js)
Comparison namespace
Members
-
<static> 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
Methods
-
<static> percentToPrice(stx, chart, percent)
-
Untransform function for percent comparison charting
Parameters:
Name Type Description stx
CIQ.ChartEngine The charting object
chart
CIQ.ChartEngine.Chart The specific chart
percent
number The price to untransform
Returns:
The untransformed price
- Type
- number
-
<static> priceFormat(stx, panel, price)
-
Formats the percentage values on the comparison chart
Parameters:
Name Type Description stx
CIQ.ChartEngine The chart object
panel
CIQ.ChartEngine.Panel The panel
price
number The raw percentage as a decimal
Returns:
The percentage formatted as a percent (possibly using localization if set in stx)
- Type
- string
-
<static> priceToPercent(stx, chart, price)
-
Transform function for percent comparison charting
Parameters:
Name Type Description stx
CIQ.ChartEngine The charting object
chart
CIQ.ChartEngine.Chart The specific chart
price
number The price to transform
Returns:
The transformed price (into percentage)
- Type
- number
-
<static> priceToRelative(stx, chart, price)
-
Transform function for relative comparison charting
Parameters:
Name Type Description stx
CIQ.ChartEngine The charting object
chart
CIQ.ChartEngine.Chart The specific chart
price
number The price to transform
- Since:
-
5.1.0
Returns:
The transformed price (relative to CIQ.Comparison.initialPrice)
- Type
- number
-
<static> relativeToPrice(stx, chart, relative)
-
Untransform function for relative comparison charting
Parameters:
Name Type Description stx
CIQ.ChartEngine The charting object
chart
CIQ.ChartEngine.Chart The specific chart
relative
number The price to untransform
- Since:
-
5.1.0
Returns:
The untransformed price
- Type
- number