Skip to content

parameters

Chris Churas edited this page Oct 17, 2024 · 8 revisions

List of Parameter objects that denote parameters to display to the user.

{
   "displayName": "Algorithm", // Key of the parameter, used as the label
   "description": "Choose to use Louvain or newer Leiden algorithm", // Tooltip or hint
   "type": "text", // Other values: "dropDown", "radio", "checkBox", "nodeColumn", "edgeColumn"
   "valueList": ["louvain", "leiden"], // Applicable when type="dropDown"
   "defaultValue": "louvain", // Default or selected value
   "validationType": "string|number|digits", // Data type is only used for text field or data type. It is ignored for other input types.
   "columnTypeFilter": "number|list|<cx2 type>", //Only for node or edge column type.
                               //Can be one of the cx2 supported datatype, number(for long or integer) or list(for any list type)                       
   "validationHelp": "Must be set to louvain or leiden",
   "validationRegex": "louvain|leiden", // Ignored for certain types
   "minValue": null, // Applies to numeric textBox
   "maxValue": null  // Applies to numeric textBox
}

displayName

Key of the parameter, used as the label

description

Tooltip or hint describing the parameter with more detail.

type

Defines UI component to show to the user.

  • text - Text box
  • dropDown - Dropdown box with values extracted from valueList and selected value set to defaultValue
  • radio - Radio button group with values set to valueList and defaultValue selected otherwise no selection
  • checkBox - checkbox with value checked if defaultValue is true
  • nodeColumn
  • edgeColumn

valueList

Values are used to populate UI components of type dropDown or radio

defaultValue

Default value to set for UI components

validationType

Only used for UI component of type text and can be set to one of the following:

  • number Allow only floating point numbers or numbers with decimals (24.5, 12, -1234.23433). Can be limited by maxValue and minValue.

  • digits Allow only digits that are wholenumbers ie (1,2,3,34,-1,-10). A (-) at the start is allowed to denote negative numbers. Can be limited by maxValue and minValue.

  • string Allow ASCI characters. Can be limited by validationRegex.

columnTypeFilter

validationHelp

Only used for UI component of type text and is the message to display if validation fails.

validationRegex

Can be set to regex to verify text matches. Only used for UI component of type text when validationType is set to string

minValue

Minimum value allowed in text field. If less, then validationHelp should be displayed to user. Only used for UI component of type text when validationType is set to number or digits

maxValue

Maximum value allowed in text field. If exceeded, then validationHelp should be displayed to user. Only used for UI component of type text when validationType is set to number or digits

Original example:

{
  "displayName": "Configuration Model",
  "description": "Configuration model which must be one of following:: RB, RBER, CPM, Suprise, Significance, Default",
  "type": "text",
  "valueList": null,
  "defaultValue": "Default",
  "validationType": "string",
  "columnTypeFilter": null,
  "validationHelp": "Must be one of following: RB, RBER, CPM, Suprise, Significance, Default",
  "validationRegex": "RB|RBER|CPM|Suprise|Significance|Default",
  "minValue": null,
  "maxValue": null
}