parameters - cytoscape/cytoscape-web GitHub Wiki
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
}
Key of the parameter, used as the label
Tooltip or hint describing the parameter with more detail.
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 istrue
- When sending the result back, set value to
true
if checked orfalse
|null
if not checked
- When sending the result back, set value to
-
nodeColumn
- Dropdown that provides a list of node columns from currently selected network. defaultValue value should be used to set the default selection. columnTypeFilter should be applied to limit what columns are in this list. -
edgeColumn
Dropdown that provides a list of edge columns from currently selected network. defaultValue value should be used to set the default selection. columnTypeFilter should be applied to limit what columns are in this list.
Values are used to populate UI components of type dropDown
or radio
Default value to set for UI components and what they mean differs depending on type value
-
text
- Set the value of the text box to this -
checkBox
- If this value istrue
it means the UI should check the box, otherwise leave box unchecked -
dropDown
- If possible, UI should set the the selected value to this -
radio
- If possible, UI should set radio value to this -
nodeColumn
oredgeColumn
- If possible, UI should set this as selected column
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.
Filters what node/edge columns should be displayed in UI component. Can be the following:
- Any CX2 data type
-
number
- Any type of numberlong
,integer
, ordouble
-
wholenumber
- Any whole numberlong
orinteger
-
list
- Any list type -
list_of_number
- Any list type of numberlist_of_long
,list_of_integer
, orlist_of_double
-
list_of_wholenumber
- Any list of whole numberlist_of_long
orlist_of_integer
Only used for UI component of type nodeColumn
or edgeColumn
Only used for UI component of type text
and is the message to display if validation fails.
Can be set to regex to verify text matches.
Only used for UI component of type text
when validationType is set to string
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
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
}