Namespace: Comparison

CIQ. Comparison

The UI portion if 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


initialPrice :number|string

For relative comparisons, this is the starting point. It can be a number to specify an absolute amount, or a string to specify to use the baseline value (the first value in dataSegment) for a specific series (for instance "IBM"). An empty string will compare against the baseline value of the main series.

See CIQ.ChartEngine#setChartScale for more details.

Type:
  • number | string
Since:
  • 5.1.0

Methods


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

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

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

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

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