Namespace: cq-comparison

WebComponents. cq-comparison

Symbol comparison component <cq-comparison>.

Add attribute cq-marker in order to have the component insert itself as a marker on the chart


<cq-comparison cq-marker>
	<cq-menu class="cq-comparison-new">
				<cq-lookup cq-keystroke-claim>
					<cq-lookup-input cq-no-close>
						<input type="text" cq-focus spellcheck="off" autocomplete="off" autocorrect="off" autocapitalize="off" placeholder="Enter Symbol">
						<cq-lookup-filters cq-no-close>
							<cq-filter class="true">ALL</cq-filter>
			<cq-swatch cq-no-close></cq-swatch>
			<span><cq-accept-btn class="stx-btn">ADD</cq-accept-btn></span>
		<template cq-comparison-item>
				<!-- cq-comparison-price displays the current price with color animation -->
				<cq-comparison-price cq-animate></cq-comparison-price>
				<!-- cq-comparison-tick-price displays the price for the active crosshair item -->
				<!-- <cq-comparison-tick-price></cq-comparison-tick-price>	-->
				<div class="stx-btn-ico ciq-close"></div>



Initializes all the children UI elements that make up <cq-comparison>.


Picks a color to display the new comparison as. Loops through preset colors and picks the next one on the list. If the all colors are taken then the last color will be repeated.

removeSeries(symbol, series)

Handles removing a series from the comparison.

Name Type Description
symbol string

Name of series as a string.

series object

Object containing info on series.


The legend gets re-rendered whenever we createDataSet() (wherein the series may have changed). We re-render the entire thing each time, but we use a virtual DOM to determine whether to actually change anything on the screen (so as to avoid unnecessary flickering)

selectItem(context, obj)

Fires whenever a new security is added as a comparison. Handles all the necessary events to update the chart with the new comparison.

Name Type Description
context object

CIQ.UI.Context The context of the chart.

obj object

The object holding info on a security.


Adds an injection to the ChartEngine that tracks the price of Comparisons.

Name Type Description
updatePrices number


Loops thru stxx.chart.series to update the current price of all comparisons.