Namespace: cq-studies

WebComponents. cq-studies

Studies List web component <cq-studies>.

This web component lists all available studies from the study library CIQ.Studies.studyLibrary.

Since:
  • 5.2.0

Example

<cq-menu class="ciq-menu ciq-studies collapse">
				<span>Studies</span>
				<cq-menu-dropdown cq-no-scroll>
					<cq-study-legend cq-no-close>
						<cq-section-dynamic>
							<cq-heading>Current Studies</cq-heading>
							<cq-study-legend-content>
								<template>
									<cq-item>
										<cq-label class="click-to-edit"></cq-label>
										<div class="ciq-icon ciq-close"></div>
									</cq-item>
								</template>
							</cq-study-legend-content>
							<cq-placeholder>
								<div stxtap="Layout.clearStudies()" class="ciq-btn sm">Clear All</div>
							</cq-placeholder>
						</cq-section-dynamic>
					</cq-study-legend>
					<cq-scroll>
						<cq-studies>
							<cq-studies-content>
								<template>
									<cq-item>
										<cq-label></cq-label>
									</cq-item>
								</template>
							</cq-studies-content>
						</cq-studies>
					</cq-scroll>
				</cq-menu-dropdown>
			</cq-menu>

Methods


Studies#initialize( [params])

Initialize the Studies list.

Parameters:
Name Type Argument Description
params Object <optional>

Parameters to control behavior of the menu

Properties
Name Type Argument Default Description
excludedStudies Object <optional>

A map of study names that should not be put in the menu.

alwaysDisplayDialog Boolean <optional>
false

If set to true then, the study will automatically be added to the chart, but a dialog will also always be displayed to allow the end user to pick their study parameters. Otherwise the study will be created automatically with defaults. Can optionally be an object containing a map of which studys to always display the dialog for.

dialogBeforeAddingStudy Boolean <optional>
false

If set to true then a dialog will be displayed before the study is added to the chart. This can optionally be a map of which studies require a dialog before adding.

Since:
  • 5.2.0 CIQ.UI.StudyMenu helper has been deprecated. Please call $("cq-studies")[0].initialize() now.
Example
var params={
		excludedStudies: {
			"Directional": true,
			"Gopala":true,
			"vchart":true
		},
		alwaysDisplayDialog: {"ma":true}, 		// this is how to always show a dialog before adding the study
		dialogBeforeAddingStudy: {"rsi": true} 	// this is how to always show a dialog before adding the study
	};
	$("cq-studies").each(function(){
		this.initialize(params);
	});

Studies#renderMenu()

Creates the menu. You have the option of coding a hardcoded HTML menu and just using CIQ.UI.Studies for processing stxtap attributes, or you can call renderMenu() to automatically generate the menu.