Namespace: cq-show-range

WebComponents. cq-show-range

Show Range web component <cq-show-range>.

Example

<cq-show-range>
 			<div stxtap="set(1,'today');">1d</div>
 			<div stxtap="set(5,'day',30,2,'minute');">5d</div>
 			<div stxtap="set(1,'month',30,8,'minute');">1m</div>
 			<div class="hide-sm" stxtap="set(3,'month');">3m</div>
 			<div class="hide-sm" stxtap="set(6,'month');">6m</div>
 			<div class="hide-sm" stxtap="set(1,'YTD');">YTD</div>
 			<div stxtap="set(1,'year');">1y</div>
 			<div class="hide-sm" stxtap="set(5,'year',1,1,'week');">5y</div>
 			<div class="hide-sm" stxtap="set(1,'all',1,1,'month');">All</div>
 	   </cq-show-range>

Methods


set(activator, multiplier, base [, interval] [, period] [, timeUnit])

Proxies UI requests for span changes to the kernel

Usage Examples:

  • set(5,'day',30,2,'minute') means that you want to combine two 30-minute bars into a single candle.
    • So your quote feed must return one data object for every 30 minutes. A total of 2 data points per hour.
  • set(5,'day',2,30,'minute') means that you want to combine thirty 2-minute bars into a single candle.
    • So your quote feed must return one data object for every 2 minutes. A total of 30 data points per hour.
  • set(5,'day', 1, 60,'minute') means that you want to combine sixty 1-minute bars into a single candle.
    • So your quote feed must return one data object for every minute . A total of 60 data points per hour.
  • set(5,'day', 60, 1,'minute') means that you want to have a single 60 minute bar per period.
    • So your quote feed must return one data object for every 60 minutes . A total of 1 data point per hour.
Parameters:
Name Type Argument Description
activator object

Activation information

multiplier number

The multiplier that will be passed to CIQ.ChartEngine#setSpan

base string

The base that will be passed to CIQ.ChartEngine#setSpan

interval number <optional>

The interval that will be passed to CIQ.ChartEngine#setSpan. Leave empty for autodetect.

period number <optional>

The period that will be passed to CIQ.ChartEngine#setSpan. Leave empty for autodetect.

timeUnit string <optional>

The timeUnit that will be passed to CIQ.ChartEngine#setSpan. Leave empty for autodetect.

Since:
  • 5.1.1 timeUnit added