Skip to content

Instantly share code, notes, and snippets.

@jwist
Created March 3, 2019 22:47
Show Gist options
  • Save jwist/226596ad9ed6b25b790a61870fb76f33 to your computer and use it in GitHub Desktop.
Save jwist/226596ad9ed6b25b790a61870fb76f33 to your computer and use it in GitHub Desktop.
view.json for visualizeR dataExplorer 3
{
"version": "2.95.0",
"grid": {
"xWidth": 10,
"yHeight": 10,
"layers": {
"Default layer": {
"name": "Default layer"
},
"admin": {
"name": "admin"
},
"selectSpectra": {
"name": "selectSpectra"
}
}
},
"modules": [
{
"url": "modules/types/display/single_value/",
"id": 1,
"title": "Selected data (double clicked)",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"append": [
[]
],
"maxEntries": [
1
],
"editable": [
[]
],
"debounce": [
0
],
"defaultvalue": [
null
],
"font": [
null
],
"fontcolor": [
[
0,
0,
0,
1
]
],
"fontsize": [
"18pt"
],
"align": [
null
],
"valign": [
null
],
"rendererOptions": [
""
],
"forceType": [
""
],
"sprintf": [
null
],
"sprintfOrder": [
null
],
"preformatted": [
[]
]
}
]
}
},
"layers": {
"Default layer": {
"zIndex": 0,
"display": true,
"title": "Selected data (double clicked)",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 1,
"top": 1
},
"size": {
"width": 30,
"height": 10
},
"bgColor": [
255,
255,
255,
0
]
},
"admin": {
"zIndex": 0,
"display": false,
"title": "Selected data (clicked)",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 1,
"top": 1
},
"size": {
"width": 30,
"height": 10
},
"bgColor": [
255,
255,
255,
0
]
},
"selectSpectra": {
"zIndex": 0,
"display": false,
"title": "Selected data (clicked)",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 1,
"top": 1
},
"size": {
"width": 30,
"height": 10
},
"bgColor": [
255,
255,
255,
0
]
}
},
"vars_in": [
{
"rel": "value",
"name": "overlayCatalogID"
},
{
"rel": "color",
"name": "overlayColor"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
]
},
{
"url": "modules/types/science/spectra/spectra_displayer/",
"id": 2,
"title": "spectra 1H-NMR",
"configuration": {
"sections": {
"graph": [
{
"sections": {},
"groups": {
"graph": [
{
"url": [
""
],
"zoom": [
"x"
],
"wheelAction": [
"zoomY"
],
"wheelbaseline": [
0
],
"fullOut": [
"none"
],
"legend": [
"top"
],
"legendOptions": [
[
"isSerieHideable",
"isSerieSelectable"
]
],
"mouseTracking": [
[
"track"
]
],
"selectScatter": [
[]
],
"independantYZoom": [
[
"yes"
]
]
}
]
}
}
],
"axis": [
{
"sections": {},
"groups": {
"xAxis": [
{
"checkboxes": [
[
"display",
"flip"
]
],
"label": [
"ppm"
],
"beforeSpacing": [
"0"
],
"afterSpacing": [
0
],
"min": [
"0"
],
"max": [
""
],
"nbTicksPrimary": [
5
],
"axismodification": [
"none"
]
}
],
"yAxis": [
{
"checkboxes": [
[
"display"
]
],
"label": [
"Relative intensity"
],
"beforeSpacing": [
"0"
],
"afterSpacing": [
0
],
"min": [
""
],
"max": [
""
],
"nbTicksPrimary": [
5
],
"fitToAxisOnFromTo": [
[]
]
}
]
}
}
],
"series": [
{
"sections": {},
"groups": {
"series": [
{
"overflow": [
[
"overflowX",
"overflowY"
]
],
"stackVerticalSpacing": [
0
]
}
]
}
}
],
"variables": [
{
"sections": {},
"groups": {
"variables": [
[
{
"variable": "currentSpectra",
"axis": "0",
"adaptTo": "none",
"plotcolor": [
1,
1,
255,
1
],
"strokewidth": "3",
"strokestyle": "1",
"plotcontinuous": "continuous",
"peakpicking": [
"picking"
],
"markers": [],
"markerShape": "1",
"markerSize": 2,
"normalize": "none",
"optimizeSlots": [],
"tracking": []
},
{
"variable": "overlaySpectra",
"axis": "0",
"adaptTo": "none",
"plotcolor": [
255,
1,
12,
1
],
"strokewidth": "1",
"strokestyle": "1",
"plotcontinuous": "continuous",
"peakpicking": [
"picking"
],
"markers": [],
"markerShape": "1",
"markerSize": 2,
"normalize": "none",
"optimizeSlots": [],
"tracking": []
}
]
]
}
}
],
"misc": [
{
"sections": {},
"groups": {
"misc": [
{
"highlightOptions": [
"{}"
]
}
]
}
}
]
},
"groups": {}
},
"layers": {
"Default layer": {
"zIndex": 0,
"display": true,
"title": "spectra 1H-NMR",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 32,
"top": 12
},
"size": {
"width": 88,
"height": 38
},
"bgColor": [
255,
255,
255,
0
]
},
"admin": {
"zIndex": 0,
"display": false,
"title": "spectra 1H-NMR",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 32,
"top": 12
},
"size": {
"width": 88,
"height": 44
},
"bgColor": [
255,
255,
255,
0
]
},
"selectSpectra": {
"zIndex": 0,
"display": false,
"title": "spectra 1H-NMR",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 32,
"top": 12
},
"size": {
"width": 88,
"height": 40
},
"bgColor": [
255,
255,
255,
0
]
}
},
"vars_in": [
{
"rel": "xyArray",
"name": "currentSpectra"
},
{
"rel": "xyArray",
"name": "overlaySpectra"
},
{
"rel": "xyArray",
"name": "minSpectra"
},
{
"rel": "xyArray",
"name": "maxSpectra"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"event": "onTrackClick",
"rel": "trackData",
"jpath": [],
"name": "trackData"
}
],
"actions_out": [
{
"event": "onZoomChange",
"rel": "fromToX",
"jpath": [],
"name": "currentAxis"
},
{
"event": "onZoomChange",
"rel": "fromToY",
"jpath": [],
"name": "currentAxisY"
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen",
"Print",
"Export Data"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
]
},
{
"url": "modules/types/display/template-twig/",
"id": 3,
"title": "Metadata viewer (hovered line)",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"selectable": [
[]
],
"template": [
"<div style=\"width:500px; height:10px; background-color: {{currentColor}}\"></div>\n\n<font size=\"+2\">\n<table>\n <tr>\n <th>catalogID</th>\n <td>{{currentMetadata.catalogID}} /</td> \n\n <th>department</th>\n <td>{{currentMetadata.department}} /</td> \n \n <th>species</th>\n <td>{{currentMetadata.species}}</td>\n </tr>\n</table>\n</font>\n"
],
"modifyInForm": [
[]
],
"debouncing": [
0
],
"formOptions": [
[
"keepFormValueIfDataUndefined"
]
]
}
]
}
},
"layers": {
"Default layer": {
"zIndex": 0,
"display": false,
"title": "Metadata viewer (hovered line)",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 32,
"top": 1
},
"size": {
"width": 88,
"height": 10
},
"bgColor": [
255,
255,
255,
0
]
},
"admin": {
"zIndex": 0,
"display": true,
"title": "Metadata viewer (hovered line)",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 47,
"top": 2
},
"size": {
"width": 88,
"height": 10
},
"bgColor": [
255,
255,
255,
0
]
},
"selectSpectra": {
"zIndex": 0,
"display": false,
"title": "Metadata viewer (hovered line)",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 32,
"top": 1
},
"size": {
"width": 88,
"height": 10
},
"bgColor": [
255,
255,
255,
0
]
}
},
"vars_in": [
{
"rel": "value",
"name": "currentMetadata"
},
{
"rel": "value",
"name": "currentColor"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
]
},
{
"url": "modules/types/display/fasttable/",
"id": 4,
"title": "Data selector",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"nblines": [
20
],
"toggle": [
null
],
"colorjpath": [
"element.color"
],
"filterRow": [
null
],
"highlightLine": [
[
"Yes"
]
]
}
],
"cols": [
[
{
"name": "ID",
"jpath": "element.ID",
"number": [],
"editable": "select"
},
{
"name": "Group",
"jpath": "element.group",
"number": [],
"editable": "checkbox"
}
]
]
}
},
"layers": {
"Default layer": {
"zIndex": 0,
"display": false,
"title": "Data selector",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 1,
"top": 12
},
"size": {
"width": 30,
"height": 73
},
"bgColor": [
255,
255,
255,
0
]
},
"admin": {
"zIndex": 0,
"display": true,
"title": "Data selector",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 160,
"top": 3
},
"size": {
"width": 30,
"height": 73
},
"bgColor": [
255,
255,
255,
0
]
},
"selectSpectra": {
"zIndex": 0,
"display": false,
"title": "Data selector",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 1,
"top": 12
},
"size": {
"width": 30,
"height": 73
},
"bgColor": [
255,
255,
255,
0
]
}
},
"vars_in": [
{
"rel": "list",
"name": "data"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [
{
"event": "onHover",
"rel": "row",
"jpath": [
"dataMatrix"
],
"name": "currentSpectra"
},
{
"event": "onSelect",
"rel": "row",
"jpath": [
"dataMatrix"
],
"name": "overlaySpectra"
},
{
"event": "onHover",
"rel": "row",
"jpath": [
"metadata"
],
"name": "currentMetadata"
},
{
"event": "onHover",
"rel": "row",
"jpath": [
"color"
],
"name": "currentColor"
},
{
"event": "onSelect",
"rel": "row",
"jpath": [
"metadata",
"catalogID"
],
"name": "overlayCatalogID"
},
{
"event": "onHover",
"rel": "row",
"jpath": [
"metadata",
"catalogID"
],
"name": "currentCatalogID"
},
{
"event": "onSelect",
"rel": "row",
"jpath": [
"color"
],
"name": "overlayColor"
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen",
"Export Data",
"Print"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
]
},
{
"url": "modules/types/display/template-twig/",
"id": 5,
"title": "current values",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"selectable": [
[]
],
"template": [
"<div style=\"width:500px; height:10px; background-color: {{currentColor}}\"></div>\n\n<font size=+1>\n<table>\n <tr><td>current spectra</td>\n <th>x</th>\n <td>{{currtrack.currentSpectra.xClosest}} /</td> \n\n <th>y</th>\n <td>{{currtrack.currentSpectra.yClosest}} /</td> \n \n <th>index</th>\n <td>{{currtrack.currentSpectra.indexClosest}}</td>\n </tr>\n <tr><td>selected spectra</td>\n <th>x</th>\n <td>{{currtrack.overlaySpectra.xClosest}} /</td> \n\n <th>y</th>\n <td>{{currtrack.overlaySpectra.yClosest}} /</td> \n \n <th>index</th>\n <td>{{currtrack.overlaySpectra.indexClosest}}</td>\n </tr>\n</table>\n</font>\n"
],
"modifyInForm": [
[]
],
"debouncing": [
0
],
"formOptions": [
[
"keepFormValueIfDataUndefined"
]
]
}
]
}
},
"layers": {
"Default layer": {
"zIndex": 0,
"display": true,
"title": "current values",
"wrapper": false,
"created": true,
"name": "Default layer",
"position": {
"left": 65,
"top": 5
},
"size": {
"width": 51,
"height": 12
},
"bgColor": [
255,
255,
255,
0
]
},
"admin": {
"zIndex": 0,
"display": false,
"title": "current values",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 32,
"top": 57
},
"size": {
"width": 34,
"height": 28
},
"bgColor": [
255,
255,
255,
0
]
},
"selectSpectra": {
"zIndex": 0,
"display": false,
"title": "current values",
"wrapper": false,
"created": true,
"name": "Default layer",
"position": {
"left": 65,
"top": 5
},
"size": {
"width": 51,
"height": 12
},
"bgColor": [
255,
255,
255,
0
]
}
},
"vars_in": [
{
"rel": "value",
"name": "currtrack"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
"12pt"
],
"fontFamily": [
""
]
}
]
},
{
"url": "modules/types/client_interaction/code_executor/",
"id": 6,
"title": "image tracking",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"var currTrack = API.getData('currtrack')\nvar images = API.getData('img')\n\nvar index = currTrack.minSpectra.indexClosest;\n\nAPI.createData('image', images[index]);\n\n\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"zIndex": 0,
"display": false,
"title": "",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 68,
"top": 57
},
"size": {
"width": 36,
"height": 28
},
"bgColor": [
255,
255,
255,
0
]
},
"admin": {
"zIndex": 0,
"display": true,
"title": "image tracking",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 2,
"top": 2
},
"size": {
"width": 44,
"height": 17
},
"bgColor": [
255,
255,
255,
0
]
},
"selectSpectra": {
"zIndex": 0,
"display": false,
"title": "",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 68,
"top": 57
},
"size": {
"width": 36,
"height": 28
},
"bgColor": [
255,
255,
255,
0
]
}
},
"vars_in": [
{
"rel": "inputValue",
"name": "currtrack"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
]
},
{
"url": "modules/types/display/single_value/",
"id": 7,
"title": "Boxplot of current variable (clicked)",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"append": [
[]
],
"maxEntries": [
1
],
"editable": [
[]
],
"debounce": [
0
],
"defaultvalue": [
null
],
"font": [
null
],
"fontcolor": [
[
0,
0,
0,
1
]
],
"fontsize": [
null
],
"align": [
null
],
"valign": [
null
],
"rendererOptions": [
""
],
"forceType": [
"png"
],
"sprintf": [
null
],
"sprintfOrder": [
null
],
"preformatted": [
[]
]
}
]
}
},
"layers": {
"Default layer": {
"zIndex": 0,
"display": true,
"title": "Boxplot of current variable (clicked)",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 121,
"top": 1
},
"size": {
"width": 51,
"height": 51
},
"bgColor": [
255,
255,
255,
0
]
},
"admin": {
"zIndex": 0,
"display": false,
"title": "",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 121,
"top": 1
},
"size": {
"width": 51,
"height": 55
},
"bgColor": [
255,
255,
255,
0
]
},
"selectSpectra": {
"zIndex": 0,
"display": false,
"title": "Boxplot of current variable (hoovered)",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 121,
"top": 1
},
"size": {
"width": 51,
"height": 51
},
"bgColor": [
255,
255,
255,
0
]
}
},
"vars_in": [
{
"rel": "value",
"name": "image"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Export Data",
"Print"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
]
},
{
"url": "modules/types/edition/object_editor/",
"id": 8,
"title": "current metadata (hoovered)",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"editable": [
"view"
],
"expanded": [
[]
],
"storeObject": [
[]
],
"displayValue": [
[]
],
"searchBox": [
[
"search"
]
],
"sendButton": [
[]
],
"output": [
"new"
],
"storedObject": [
"{}"
]
}
]
}
},
"layers": {
"Default layer": {
"zIndex": 0,
"display": true,
"title": "current metadata (hoovered)",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 1,
"top": 86
},
"size": {
"width": 119,
"height": 21
},
"bgColor": [
255,
255,
255,
0
]
},
"admin": {
"zIndex": 0,
"display": false,
"title": "",
"wrapper": true,
"created": true,
"name": "admin",
"position": {
"left": 101,
"top": 19
},
"size": {
"width": 55,
"height": 46
},
"bgColor": [
255,
255,
255,
0
]
},
"selectSpectra": {
"zIndex": 0,
"display": false,
"title": "current metadata (hoovered)",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 32,
"top": 53
},
"size": {
"width": 88,
"height": 32
},
"bgColor": [
255,
255,
255,
0
]
}
},
"vars_in": [
{
"rel": "value",
"name": "currentMetadata"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"event": "onObjectChange",
"rel": "output",
"jpath": [],
"name": "modifiedQuantile"
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
]
},
{
"url": "modules/types/client_interaction/code_executor/",
"id": 9,
"title": "sparkline tracking",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"\nlet currentSpectra = API.getData('currentSpectra')\nlet data = API.getData('data')\n\nlet currTrack = API.getData('currtrack')\nlet index = currTrack.minSpectra.indexClosest\nlet result = API.getData('dataByGroup')\n\nlet quantiles = API.getData('quantileByGroup')\n\nfunction Boxplot (title, boxData) {\n this.title = title,\n this.data = new Array(boxData)\n}\n\nfunction BoxData (x, q1, q2, q3, whiskers, outliers) {\n this.type = 'box',\n this.boxes = new Array( \n {'x' : x, \n 'Q1' : q1, \n 'Q2' : q2, \n 'Q3' : q3, \n 'whiskers' : whiskers, \n 'outliers' : outliers})\n}\n\n//let q = quantiles.map(x => new Boxplot(\"\"))\nlet boxData = new BoxData(0, 0, 1, 3, [-1, 5], [10, 12])\nlet boxPlot = new Boxplot('dd', boxData)\n\nAPI.createData('boxPlot', boxPlot)\nconsole.log(boxPlot)\n\nconsole.log(quantiles)\n\nlet indik = []\nObject.keys(result).forEach(e => \n indik.push({\"index\": e,\n \"indicator\": {\n \"type\": \"sparkline\",\n \"value\": result[e].map(x => x.dataMatrix[index*2+1]),\n \"_options\": {\n \"type\": \"box\",\n \"raw\": false,\n \"minValue\": -50,\n \"maxValue\": 20,\n \"boxLineColor\": \"black\",\n \"boxFillColor\": \"lightgrey\",\n \"whiskerColor\": \"black\",\n \"medianColor\": \"red\",\n \"lineColor\": \"black\",\n \"target\": currentSpectra[index*2+1],\n \"targetColor\": \"green\"\n }\n }})\n)\n\nindik.push({\"index\": \"All\",\n \"indicator\": {\n \"type\": \"sparkline\",\n \"value\": data.map(x => x.dataMatrix[index*2+1]),\n \"_options\": {\n \"type\": \"box\",\n \"raw\": false,\n \"minValue\": -50,\n \"maxValue\": 20,\n \"boxLineColor\": \"black\",\n \"boxFillColor\": \"lightgrey\",\n \"whiskerColor\": \"black\",\n \"medianColor\": \"red\",\n \"lineColor\": \"black\",\n \"target\": currentSpectra[index*2+1],\n \"targetColor\": \"green\"}\n }})\n\n\nAPI.createData('indik', indik);\n\nconsole.log(\"sparkline tracking executed\")\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"zIndex": 0,
"display": false,
"title": "",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"bgColor": [
255,
255,
255,
0
]
},
"admin": {
"zIndex": 0,
"display": true,
"title": "sparkline tracking",
"wrapper": true,
"created": true,
"name": "admin",
"position": {
"left": 97,
"top": 13
},
"size": {
"width": 62,
"height": 54
},
"bgColor": [
255,
255,
255,
0
]
},
"selectSpectra": {
"zIndex": 0,
"display": false,
"title": "",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"bgColor": [
255,
255,
255,
0
]
}
},
"vars_in": [
{
"rel": "inputValue",
"name": "currtrack"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"event": "onScriptEnded",
"rel": "outputValue",
"jpath": [],
"name": "currentQuantile"
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
]
},
{
"url": "modules/types/edition/slick_grid/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"slickCheck": [
[
"enableCellNavigation",
"rowNumbering",
"forceFitColumns",
"highlightScroll",
"forgetLastActive"
]
],
"copyPaste": [
[]
],
"copyPasteOptions": [
[
"newRows"
]
],
"autoColumns": [
[]
],
"toolbar": [
[]
],
"colorjpath": [
[]
],
"slick.defaultColumnWidth": [
null
],
"slick.rowHeight": [
"50"
],
"slick.headerRowHeight": [
30
],
"slick.selectionModel": [
"row"
],
"idProperty": [
""
],
"filterType": [
"pref"
],
"filterRow": [
"// Documentation: https://github.com/NPellet/visualizer/blob/46b40ca86345f8fa313563bf9c6ecb80ba323101/src/modules/types/edition/slick_grid/view.js#L1695-L1735"
],
"customJpaths": [
""
]
}
],
"cols": [
[
{
"jpath": [],
"editor": "none",
"forceType": "",
"formatter": "typerenderer",
"copyFormatter": "default",
"visibility": "both",
"rendererOptions": "",
"editorOptions": "",
"hideColumn": []
}
]
],
"actionCols": [
[
{
"backgroundColor": [
255,
255,
255,
0
],
"color": [
0,
0,
0,
1
],
"position": "end",
"clickMode": "text"
}
]
],
"groupings": [
[
{
"getter": []
}
]
],
"actionOutButtons": [
[
{}
]
],
"data": [
{
"saveInView": [
[]
],
"varname": [
""
],
"data": [
"[]"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 121,
"top": 53
},
"size": {
"width": 51,
"height": 54
},
"zIndex": 0,
"display": true,
"title": "Boxplot of current variable (clicked) with current value (green \"+\")",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 104,
"top": 52
},
"size": {
"width": 41,
"height": 31
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"selectSpectra": {
"position": {
"left": 121,
"top": 53
},
"size": {
"width": 51,
"height": 32
},
"zIndex": 0,
"display": false,
"title": "Boxplot of current variable (hoovered) with current value (green \"+\")",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 10,
"vars_in": [
{
"rel": "list",
"name": "indik"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Print",
"Export Data",
"Show fullscreen"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Boxplot of current variable (clicked) with current value (green \"+\")"
},
{
"url": "modules/types/display/single_value/",
"id": 11,
"title": "current data (hoovered)",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"append": [
[]
],
"maxEntries": [
1
],
"editable": [
[]
],
"debounce": [
0
],
"defaultvalue": [
null
],
"font": [
null
],
"fontcolor": [
[
0,
0,
0,
1
]
],
"fontsize": [
"18pt"
],
"align": [
null
],
"valign": [
null
],
"rendererOptions": [
""
],
"forceType": [
""
],
"sprintf": [
null
],
"sprintfOrder": [
null
],
"preformatted": [
[]
]
}
]
}
},
"layers": {
"Default layer": {
"zIndex": 0,
"display": true,
"title": "current data (hoovered)",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 32,
"top": 1
},
"size": {
"width": 30,
"height": 10
},
"bgColor": [
255,
255,
255,
0
]
},
"admin": {
"zIndex": 0,
"display": false,
"title": "Selected data (clicked)",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 1,
"top": 1
},
"size": {
"width": 30,
"height": 10
},
"bgColor": [
255,
255,
255,
0
]
},
"selectSpectra": {
"zIndex": 0,
"display": false,
"title": "current data (hoovered)",
"wrapper": true,
"created": true,
"name": "Default layer",
"position": {
"left": 32,
"top": 1
},
"size": {
"width": 30,
"height": 10
},
"bgColor": [
255,
255,
255,
0
]
}
},
"vars_in": [
{
"rel": "value",
"name": "currentCatalogID"
},
{
"rel": "color",
"name": "currentColor"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
]
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"//http://www.cheminfo.org/Tutorial/6._Renderer/6.6_Sparklines/index.html\n//http://www.cheminfo.org/?viewURL=https%3A%2F%2Fcouch.cheminfo.org%2Fcheminfo-public%2Fb50564ac9d207212f8e5ae8167bcd627%2Fview.json&loadversion=true&fillsearch=6.4+Indicator\n//https://www.cheminfo.org/?viewURL=https%3A%2F%2Fcouch.cheminfo.org%2Fcheminfo-public%2F9cfcc8ba7999bf41e2c88a92a96a0201%2Fview.json&loadversion=true&fillsearch=7.3+Superagent+and+files+from+GitHub+Ajax\n//http://www.cheminfo.org/ML/Regression/index.html\n\nlet data = API.getData('data')\n\nlet x = data[0].dataMatrix.filter(function(value, index, Arr) {\n return index % 2 == 0\n})\n\nlet y = data.map( x => \n x.dataMatrix.filter((value, index, Arr) => \n index % 2 == 1\n )\n)\n\n//console.time(\"timer\")\n//let sum = y.reduce((previous, current) => \n// current.map((num, idx) => \n// num + previous[idx]\n// )\n//).map(x => x / y.length)\n//console.timeEnd(\"timer\")\n\n//console.time(\"timer2\")\n//let yT = _.zip(...y)\n\nlet yT = y[0].map((col, i) => y.map(row => row[i]))\n\nlet max = yT.map(x => Math.max(...x))\nlet min = yT.map(x => Math.min(...x))\n\nlet mean = yT.map(x => \n x.reduce((a, c) => \n a + c\n )\n ).map(x => x / y.length)\n//console.timeEnd(\"timer2\")\n\nvar s = []\nlet a = [1,2,3,4]\nlet meanS = x.map((v, ind) => [v, mean[ind]]).reduce((a,b) => a.concat(b) )\ns = []\nlet maxS = x.map((v, ind) => [x[ind], max[ind]]).reduce((a,b) => a.concat(b) )\ns = []\nlet minS = x.map((v, ind) => [v, min[ind]]).reduce((a,b) => a.concat(b) )\n\n\nAPI.createData('minSpectra', minS)\nAPI.createData('maxSpectra', maxS)\nAPI.createData('meanSpecta', meanS)\n\nvar result = data.reduce(function (r, a) {\n r[a.group] = r[a.group] || [];\n r[a.group].push(a);\n return r;\n }, Object.create(null));\n\nAPI.createData('dataByGroup', result)\n\n\nconsole.log(\"compute statistic executed\")"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 47,
"top": 13
},
"size": {
"width": 49,
"height": 54
},
"zIndex": 0,
"display": true,
"title": "compute statistics",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"selectSpectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 12,
"vars_in": [
{
"rel": "inputValue",
"name": "data"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "compute statistics"
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"var t = API.getData('trackData')\n\nt.minSpectra.indexClosest += 1\nt.maxSpectra.indexClosest += 1\nt.currentSpectra.indexClosest += 1\nt.overlaySpectra.indexClosest += 1\n\n\nAPI.createData('currtrack', t)"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 2,
"top": 20
},
"size": {
"width": 44,
"height": 17
},
"zIndex": 0,
"display": true,
"title": "correct index",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"selectSpectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 13,
"vars_in": [
{
"rel": "inputValue",
"name": "trackData"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "correct index"
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"\nlet indik = API.getData('indik')\nvar currentSpectra = API.getData('currentSpectra')\nvar currTrack = API.getData('currtrack')\nvar index = currTrack.minSpectra.indexClosest\n\nindik.map( x => x.indicator._options.target = currentSpectra[index*2+1])\n\nAPI.createData('indik', indik);\n\nconsole.log(\"sparkline target update executed\")\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 2,
"top": 38
},
"size": {
"width": 44,
"height": 17
},
"zIndex": 0,
"display": true,
"title": "Sparkline target update ",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"selectSpectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 14,
"vars_in": [
{
"rel": "inputValue",
"name": "currentSpectra"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Sparkline target update "
},
{
"url": "modules/types/display/single_value/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"append": [
[]
],
"maxEntries": [
1
],
"editable": [
[]
],
"debounce": [
0
],
"defaultvalue": [
null
],
"font": [
null
],
"fontcolor": [
[
0,
0,
0,
1
]
],
"fontsize": [
null
],
"align": [
null
],
"valign": [
null
],
"rendererOptions": [
""
],
"forceType": [
"chart"
],
"sprintf": [
null
],
"sprintfOrder": [
null
],
"preformatted": [
[]
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 2,
"top": 56
},
"size": {
"width": 44,
"height": 38
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"selectSpectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 15,
"vars_in": [
{
"rel": "value",
"name": "boxPlot"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": ""
},
{
"url": "modules/types/edition/object_editor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"editable": [
"view"
],
"expanded": [
[]
],
"storeObject": [
[]
],
"displayValue": [
[]
],
"searchBox": [
[
"search"
]
],
"sendButton": [
[]
],
"output": [
"new"
],
"storedObject": [
"{}"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 47,
"top": 68
},
"size": {
"width": 49,
"height": 26
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"selectSpectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 16,
"vars_in": [
{
"rel": "value",
"name": "boxPlot"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": ""
},
{
"url": "modules/types/science/spectra/spectra_displayer/",
"configuration": {
"sections": {
"graph": [
{
"sections": {},
"groups": {
"graph": [
{
"url": [
""
],
"zoom": [
"x"
],
"wheelAction": [
"zoomY"
],
"wheelbaseline": [
0
],
"fullOut": [
"none"
],
"legend": [
"none"
],
"legendOptions": [
[
"isSerieHideable",
"isSerieSelectable",
"movable"
]
],
"mouseTracking": [
[]
],
"selectScatter": [
[]
],
"independantYZoom": [
[
"yes"
]
]
}
]
}
}
],
"axis": [
{
"sections": {},
"groups": {
"xAxis": [
{
"checkboxes": [
[
"display",
"flip",
"main"
]
],
"label": [
"ppm"
],
"beforeSpacing": [
"0"
],
"afterSpacing": [
0
],
"min": [
""
],
"max": [
""
],
"nbTicksPrimary": [
5
],
"axismodification": [
"none"
]
}
],
"yAxis": [
{
"checkboxes": [
[
"display",
"main"
]
],
"label": [
"Relative Intensity"
],
"beforeSpacing": [
"0"
],
"afterSpacing": [
0
],
"min": [
""
],
"max": [
""
],
"nbTicksPrimary": [
5
],
"fitToAxisOnFromTo": [
[]
]
}
]
}
}
],
"series": [
{
"sections": {},
"groups": {
"series": [
{
"overflow": [
[]
],
"stackVerticalSpacing": [
0
]
}
]
}
}
],
"variables": [
{
"sections": {},
"groups": {
"variables": [
[
{
"variable": "",
"axis": "0",
"adaptTo": "none",
"plotcolor": [
1,
1,
255,
1
],
"strokewidth": "1",
"strokestyle": "1",
"plotcontinuous": "continuous",
"peakpicking": [],
"markers": [],
"markerShape": "1",
"markerSize": 2,
"normalize": "none",
"optimizeSlots": [],
"tracking": []
}
]
]
}
}
],
"misc": [
{
"sections": {},
"groups": {
"misc": [
{
"highlightOptions": [
"{}"
]
}
]
}
}
]
},
"groups": {}
},
"layers": {
"Default layer": {
"position": {
"left": 32,
"top": 51
},
"size": {
"width": 88,
"height": 34
},
"zIndex": 0,
"display": true,
"title": "Select multiple spectra in the table to display them here",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"selectSpectra": {
"position": {
"left": 1,
"top": 3
},
"size": {
"width": 89,
"height": 50
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "test"
}
},
"id": 17,
"vars_in": [
{
"rel": "chart",
"name": "spectraToDisplay"
},
{
"rel": "chart",
"name": "currentSpectraToDisplay"
}
],
"actions_in": [
{
"rel": "fromToX",
"name": "currentAxis"
},
{
"rel": "fromToY",
"name": "currentAxisY"
}
],
"vars_out": [
{
"event": "onMouseOverMarker",
"rel": "markerInfos",
"jpath": [],
"name": "testShape"
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen",
"Export Data",
"Print"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Select multiple spectra in the table to display them here"
},
{
"url": "modules/types/edition/object_editor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"editable": [
"view"
],
"expanded": [
[]
],
"storeObject": [
[]
],
"displayValue": [
[]
],
"searchBox": [
[
"search"
]
],
"sendButton": [
[]
],
"output": [
"new"
],
"storedObject": [
"{}"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"selectSpectra": {
"position": {
"left": 91,
"top": 3
},
"size": {
"width": 60,
"height": 46
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "test"
}
},
"id": 18,
"vars_in": [
{
"rel": "value",
"name": "currentSpectraToDisplay"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": ""
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"let data = API.getData('selectedSpectra')\nlet currentData = API.getData('currentSpectra')\n\nlet currTrack = API.getData('currtrack')\nlet index = currTrack.minSpectra.indexClosest\n\nlet dataByGroup = API.getData('dataByGroup')\n\nlet x = data[0].dataMatrix.filter(function(value, index, Arr) {\n return index % 2 == 0\n})\n\nlet color = []\nlet col = []\nx.forEach( i => col.push({'_rgb':[0,0,255,1]}) )\n//color.forEach((ele, ind, arr) => arr[ind]._rgb[0] = 0)\n\n\nlet y = data.map( x => \n x.dataMatrix.filter((value, index, Arr) => \n index % 2 == 1\n )\n)\n\nlet spectra = data.map((e, i) => {\n let groupColor = e.color.split(\"(\")[1].split(\")\")[0].split(\",\").map(Number)\n color =[]\n x.forEach( () => color.push({'_rgb':groupColor}) )\n let s = (\n {'type': 'color',\n 'y': y[i],\n 'x': x,\n 'color': color\n })\n return s\n }\n)\n//console.log(data[0].dataMatrix[1])\n//console.log(y[0][0])\n\nlet currentSpectra = (\n {'type': 'color',\n 'y': currentData.filter((value, index, Arr) => index % 2 == 1),\n 'x': x,\n 'color': col\n }\n)\n\n\nAPI.createData('spectraToDisplay', {'data':spectra})\nAPI.createData('currentSpectraToDisplay', {'data':currentSpectra})\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"selectSpectra": {
"position": {
"left": 91,
"top": 50
},
"size": {
"width": 60,
"height": 40
},
"zIndex": 0,
"display": true,
"title": "Format selected spectra as chart",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "test"
}
},
"id": 19,
"vars_in": [
{
"rel": "inputValue",
"name": "selectedSpectra"
},
{
"rel": "inputValue",
"name": "currentSpectra"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Format selected spectra as chart"
},
{
"url": "modules/types/edition/slick_grid/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"slickCheck": [
[
"enableCellNavigation",
"rowNumbering",
"forceFitColumns",
"highlightScroll",
"forgetLastActive",
"editable",
"filterColumns",
"keepSelected"
]
],
"copyPaste": [
[]
],
"copyPasteOptions": [
[
"newRows"
]
],
"autoColumns": [
[]
],
"toolbar": [
[]
],
"colorjpath": [
[
"color"
]
],
"slick.defaultColumnWidth": [
null
],
"slick.rowHeight": [
null
],
"slick.headerRowHeight": [
30
],
"slick.selectionModel": [
"row"
],
"idProperty": [
""
],
"filterType": [
"pref"
],
"filterRow": [
"// Documentation: https://github.com/NPellet/visualizer/blob/46b40ca86345f8fa313563bf9c6ecb80ba323101/src/modules/types/edition/slick_grid/view.js#L1695-L1735"
],
"customJpaths": [
""
]
}
],
"cols": [
[
{
"name": "ID",
"jpath": [
"ID"
],
"editor": "none",
"forceType": "",
"formatter": "typerenderer",
"copyFormatter": "default",
"visibility": "both",
"rendererOptions": "",
"editorOptions": "",
"hideColumn": []
},
{
"name": "Group",
"jpath": [
"group"
],
"editor": "none",
"forceType": "",
"formatter": "typerenderer",
"copyFormatter": "default",
"visibility": "both",
"rendererOptions": "",
"editorOptions": "",
"hideColumn": []
}
]
],
"actionCols": [
[
{
"backgroundColor": [
255,
255,
255,
0
],
"color": [
0,
0,
0,
1
],
"position": "end",
"clickMode": "text"
}
]
],
"groupings": [
[
{
"getter": []
}
]
],
"actionOutButtons": [
[
{}
]
],
"data": [
{
"saveInView": [
[]
],
"varname": [
""
],
"data": [
"[]"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 1,
"top": 12
},
"size": {
"width": 30,
"height": 73
},
"zIndex": 0,
"display": true,
"title": "Data Selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"selectSpectra": {
"position": {
"left": 1,
"top": 54
},
"size": {
"width": 89,
"height": 36
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "test"
}
},
"id": 20,
"vars_in": [
{
"rel": "list",
"name": "data"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [
{
"event": "onRowsSelect",
"rel": "rows",
"jpath": [],
"name": "selectedSpectra"
},
{
"event": "onHover",
"rel": "row",
"jpath": [
"dataMatrix"
],
"name": "currentSpectra"
},
{
"event": "onDoubleClick",
"rel": "row",
"jpath": [
"dataMatrix"
],
"name": "overlaySpectra"
},
{
"event": "onHover",
"rel": "row",
"jpath": [
"color"
],
"name": "currentColor"
},
{
"event": "onDoubleClick",
"rel": "row",
"jpath": [
"color"
],
"name": "overlayColor"
},
{
"event": "onHover",
"rel": "row",
"jpath": [
"ID"
],
"name": "currentCatalogID"
},
{
"event": "onDoubleClick",
"rel": "row",
"jpath": [
"ID"
],
"name": "overlayCatalogID"
},
{
"event": "onHover",
"rel": "row",
"jpath": [
"metadata"
],
"name": "currentMetadata"
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen",
"Export Data",
"Print"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Data Selector"
}
],
"variables": [
{
"varname": "data",
"jpath": [
"data"
]
},
{
"varname": "metadata",
"jpath": [
"data",
"0",
"metadata"
]
},
{
"varname": "img",
"jpath": [
"img"
]
},
{
"varname": "quantileByGroup",
"jpath": [
"quantileByGroup"
]
}
],
"aliases": [
{}
],
"configuration": {
"title": "visualizeR dataExplorer 3.1"
},
"actionscripts": [
{
"sections": {},
"groups": {
"action": [
{
"name": [
null
],
"script": [
null
]
}
]
}
}
],
"init_script": [
{
"sections": {},
"groups": {
"general": [
{
"script": [
null
]
}
]
}
}
],
"custom_filters": [
{
"sections": {
"modules": [
{
"sections": {},
"groups": {
"modules": [
[
{}
]
]
}
}
],
"filtersLib": [
{
"sections": {},
"groups": {
"filters": [
[
{}
]
]
}
}
],
"filters": [
{
"sections": {},
"groups": {
"filter": [
{
"name": [
null
],
"script": [
null
]
}
],
"libs": [
[
{}
]
]
}
}
]
},
"groups": {}
}
],
"actionfiles": [
{
"sections": {},
"groups": {
"action": [
[
{}
]
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment