Class: DialogHelper

CIQ.Studies. DialogHelper

new DialogHelper(params)

Generates an object that can be used to create a dialog for creating or modifying a study. The object will then contain arrays for inputs, outputs and parameters. Each input will describe a form field that should be generated. Each output will describe a color swatch that should be generated. The results of the dialog would then be passed to CIQ.Studies.addStudy.

Name Type Description
params object

Object containing the following:

Name Type Argument Description
name string <optional>

The libraryEntry key for the study to add. The libraryEntry is the object that defines the prototype for a study. May contain attributes which are used to help construct the input fields of the study dialog. See documentation of CIQ.Studies.studyLibrary and DialogHelper Object. Not needed if is present.

sd studyDescriptor <optional>

A study descriptor; when requesting values for an existing study. If present, takes precedence over You may set the 'panelName' parameter to "panel" (sd.parameters.panelName), and this method will provide in the parameters object an array of valid panels, which you can present to the user as options to move the study to a different panel.

stx CIQ.CIQ.ChartEngine

A chart object

var helper=new CIQ.Studies.DialogHelper({name:"stochastics",stx:stxx});
// how to set 'panelName' to get a list of all available panels as part of the parameters object
var sd = CIQ.Studies.addStudy(stxx, "Aroon");
var dialogHelper = new CIQ.Studies.DialogHelper({"stx":stxx,"sd":sd});



Update (or add) the study attached to the DialogHelper.

Once added or modified, the new study descriptor will be stored in the sd object of the DialogHelper.

Name Type Description
updates Object

If updating, it should contain an object with updates to the inputs, outputs and parameters object used in CIQ.Studies.addStudy. A new study ID will be created using the default format or parameters.replaceID, if provided.

var helper=new CIQ.Studies.DialogHelper({sd:sd, stx:stx});
var updatedStudy =;
// add the study
var initialStudy = CIQ.Studies.addStudy(stxx, "Aroon");

// move it to the primary (chart) panel
var dialogHelper = new CIQ.Studies.DialogHelper({"stx":stxx,"sd": initialStudy});

// capture the updated study descriptor for future use ( the initialStudy can not be used any more as the actual study has changed when it was moved )
var updatedStudy =;

// move the updated study back to its own panel
var dialogHelper = new CIQ.Studies.DialogHelper({"stx":stxx,"sd":updatedStudy});
dialogHelper.updateStudy({"parameters":{"panelName":"Own panel"}});