API Reference
Namespaces
Classes
Events
Global
Externals

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 chart engine.

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 period that will be passed to CIQ.ChartEngine#setSpan

base Number

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

interval Number <optional>

Chart interval to use (leave empty for autodetect)

period Number <optional>

Chart period to use (leave empty for autodetect)

timeUnit Number <optional>

Chart timeUnit to use (leave empty for autodetect)

Since:
  • 5.1.1 timeUnit added