BNA8/.resources/431b815bcef32a5cb0c683b01bba0651df4abc36ddbc0d8251a5bd317293fc18

2276 lines
76 KiB
Plaintext

{
"custom": {
"tabData": [
{
"chartNamedQuery": "Statistics/Gaylords/DetailsChart",
"dataNamedQuery": "Statistics/Gaylords/Details",
"idField": "gaylord",
"isAdmin": false,
"isBar": false,
"isVisible": true,
"title": "Gaylord Details",
"uniqueNamedQuery": ""
},
{
"chartNamedQuery": "Statistics/AR/InductDetailsChart",
"dataNamedQuery": "Statistics/AR/InductDetails",
"idField": "induct",
"isAdmin": false,
"isBar": false,
"isVisible": true,
"title": "AR Induct Details",
"uniqueNamedQuery": ""
},
{
"chartNamedQuery": "Statistics/AR/RobinDetailsChart",
"dataNamedQuery": "Statistics/AR/RobinDetails",
"idField": "chute",
"isAdmin": false,
"isBar": false,
"isVisible": true,
"title": "Robin MEP Volume",
"uniqueNamedQuery": ""
},
{
"chartNamedQuery": "Statistics/AR/SorterDetailsChart",
"dataNamedQuery": "Statistics/AR/SorterDetails",
"idField": "sorter",
"isAdmin": true,
"isBar": false,
"isVisible": true,
"title": "AR Sorter Details",
"uniqueNamedQuery": ""
},
{
"chartNamedQuery": "Statistics/AR/LaneDetailsChart",
"dataNamedQuery": "Statistics/AR/LaneDetails",
"idField": "lane",
"isAdmin": true,
"isBar": false,
"isVisible": true,
"title": "AR Lane Details",
"uniqueNamedQuery": ""
},
{
"chartNamedQuery": "Statistics/AR/HourlyLaneChart",
"dataNamedQuery": "Statistics/AR/HourlyLane",
"idField": "lane",
"isAdmin": false,
"isBar": true,
"isVisible": true,
"title": "Hourly AR Induct",
"uniqueNamedQuery": "Statistics/AR/UniqueInducts"
},
{
"chartNamedQuery": "Statistics/AR/HourlyLaneChart",
"dataNamedQuery": "Statistics/AR/HourlyLane",
"idField": "lane",
"isAdmin": false,
"isBar": true,
"isVisible": true,
"title": "Hourly Robin Volume",
"uniqueNamedQuery": "Statistics/AR/UniqueRobins"
},
{
"chartNamedQuery": "Statistics/AR/HourlySorterChart",
"dataNamedQuery": "Statistics/AR/HourlySorter",
"idField": "sorter",
"isAdmin": true,
"isBar": true,
"isVisible": true,
"title": "Hourly AR Sorter",
"uniqueNamedQuery": "Statistics/AR/UniqueSorters"
},
{
"chartNamedQuery": "Statistics/AR/HourlyLaneChart",
"dataNamedQuery": "Statistics/AR/HourlyLane",
"idField": "lane",
"isAdmin": true,
"isBar": true,
"isVisible": true,
"title": "Hourly AR Lane",
"uniqueNamedQuery": "Statistics/AR/UniqueLanes"
},
{
"chartNamedQuery": "Statistics/Sorter/InductDetailsChart",
"dataNamedQuery": "Statistics/Sorter/InductDetails",
"idField": "induct",
"isAdmin": false,
"isBar": false,
"isVisible": true,
"title": "Induct Details",
"uniqueNamedQuery": ""
},
{
"chartNamedQuery": "Statistics/Sorter/ScannerDetailsChart",
"dataNamedQuery": "Statistics/Sorter/ScannerDetails",
"idField": "scanner",
"isAdmin": false,
"isBar": false,
"isVisible": true,
"title": "Scanner Details",
"uniqueNamedQuery": ""
},
{
"chartNamedQuery": "Statistics/Sorter/SorterSummaryChart",
"dataNamedQuery": "Statistics/Sorter/SorterSummary",
"idField": "sorter",
"isAdmin": false,
"isBar": false,
"isVisible": true,
"title": "Sorter Summary",
"uniqueNamedQuery": ""
},
{
"chartNamedQuery": "Statistics/Sorter/SorterDetailsChart",
"dataNamedQuery": "Statistics/Sorter/SorterDetails",
"idField": "sorter",
"isAdmin": false,
"isBar": false,
"isVisible": true,
"title": "Sorter Details",
"uniqueNamedQuery": ""
},
{
"chartNamedQuery": "Statistics/Sorter/LaneDetailsChart",
"dataNamedQuery": "Statistics/Sorter/LaneDetails",
"idField": "lane",
"isAdmin": false,
"isBar": false,
"isVisible": true,
"title": "Lane Details",
"uniqueNamedQuery": ""
}
],
"timewidget": {
"endDate": {
"$": [
"ts",
192,
1637031280586
],
"$ts": 1637107200000
},
"mode": "currentDay",
"startDate": {
"$": [
"ts",
192,
1637031280586
],
"$ts": 1637020800000
},
"update": {
"$": [
"ts",
192,
1637031280586
],
"$ts": 1637031280585
}
},
"titleExtra": "0 rows"
},
"params": {},
"propConfig": {
"custom.tabData": {
"binding": {
"config": {
"struct": {
"auth": "{session.props.auth.user.roles}",
"tabs": "{[default]Gateway/StatisticsTabs}"
},
"waitOnAll": true
},
"transforms": [
{
"code": "\troles \u003d [\"Administrator\", \"Developer\"]\n\tauth \u003d value.auth\n\ttabs \u003d value.tabs\n\tisNotAuth \u003d (auth \u003d\u003d None or len(auth) \u003d\u003d 0 or len([i for i in auth if i in roles]) \u003d\u003d 0)\n\treturn [v for v in utils.datasetToJSON(tabs) if v[\"isVisible\"] and not (v[\"isAdmin\"] and isNotAuth)]",
"type": "script"
}
],
"type": "expr-struct"
},
"persistent": true
},
"custom.tabDataAdmin": {
"persistent": true
},
"custom.tabDataOperator": {
"persistent": true
},
"custom.timewidget": {
"binding": {
"config": {
"path": "session.custom.timewidget"
},
"type": "property"
},
"onChange": {
"enabled": null,
"script": "\tif self.custom.tabData \u003c\u003e None and len(self.custom.tabData) \u003e 0:\n\t\troot \u003d self.getChild(\"root\")\n\t\troot.getChild(\"Table\").forceRefresh()\n\t\troot.getChild(\"LineChart\").forceRefresh()\n\t\troot.getChild(\"BarChart\").forceRefresh()"
},
"persistent": true
},
"custom.titleExtra": {
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 525,
"width": 1600
}
},
"root": {
"children": [
{
"meta": {
"name": "Label"
},
"position": {
"height": 40,
"width": "100%"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"expression": "try(\r\n\t property(\"../TabContainer.props.tabs[\"+{../TabContainer.props.currentTabIndex}+\"]\")\r\n\t+if(len({view.custom.titleExtra})\u003e0,\r\n\t\t\" (\" + {view.custom.titleExtra} + \")\",\r\n\t\t\"\"\r\n\t),\r\n\t\"No Statistics\"\r\n)"
},
"type": "expr"
}
}
},
"props": {
"style": {
"backgroundColor": "#1A4A5E",
"borderBottomColor": "#000000",
"borderBottomStyle": "solid",
"borderBottomWidth": "2px",
"color": "#fff",
"fontFamily": "Helvetica",
"fontSize": 20,
"fontWeight": "bold",
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\ttable \u003d self.getSibling(\"Table\")\n\tlines \u003d self.getSibling(\"LineChart\")\n\tbars \u003d self.getSibling(\"BarChart\")\n\tdropdown \u003d self.getSibling(\"Dropdown\")\n\ttabContainer \u003d self.getSibling(\"TabContainer\")\n\ttabData \u003d self.view.custom.tabData[tabContainer.props.currentTabIndex]\n\t# Create title:\n\ttitle \u003d tabData.title\n\tif len(dropdown.props.options) \u003e 0:\n\t\ttitle \u003d dropdown.props.value + \" \" + title\n\t# Force CSV download:\n\tutils.downloadCSV(table, title)\n\tif lines.meta.visible:\n\t\tutils.downloadCSV(lines.props.series[0].data, title + \" Chart\")\n\tif bars.meta.visible:\n\t\tutils.downloadCSV(bars.props.dataSources.example, title + \" Chart\")"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Button"
},
"position": {
"height": 30,
"width": 100,
"x": "calc(100% - 105px)",
"y": 5
},
"props": {
"style": {
"classes": "Buttons/Grey"
},
"text": "Export"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "TimeWidget"
},
"position": {
"height": 40,
"width": 600
},
"props": {
"params": {
"endDate": "2021-02-11 00:00:00",
"startDate": "2021-02-10 00:00:00"
},
"path": "Templates/Widget/TimeWidget"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "TabContainer"
},
"position": {
"height": "calc(100% - 40px)",
"width": "100%",
"y": 40
},
"propConfig": {
"props.currentTabIndex": {
"onChange": {
"enabled": null,
"script": "\t# Reset components:\n\tlines \u003d self.getSibling(\"LineChart\")\n\tlines.meta.visible \u003d False\n\tlines.props.series[0].data \u003d system.dataset.clearDataset(lines.props.series[0].data)\n\tbars \u003d self.getSibling(\"BarChart\")\n\tbars.meta.visible \u003d False\n\tbars.props.dataSources.example \u003d system.dataset.clearDataset(bars.props.dataSources.example)\n\ttable \u003d self.getSibling(\"Table\")\n\ttable.props.data \u003d system.dataset.clearDataset(table.props.data)\n\ttable.props.selection.selectedColumn \u003d None\n\ttable.props.selection.selectedRow \u003d None\n\t#table.props.selection.data \u003d []\n\tself.getSibling(\"Dropdown\").props.value \u003d \"\"\n\t# Now update the current tab data:\n\tif len(self.props.tabs) \u003e 0:\n\t\tself.getSibling(\"Table\").forceRefresh()"
}
},
"props.tabs": {
"binding": {
"config": {
"path": "view.custom.tabData"
},
"transforms": [
{
"code": "\t# Return tab list:\n\treturn [val.title for val in value]",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"menuStyle": {
"backgroundColor": "#225E77"
},
"tabSize": {
"width": 160
},
"tabStyle": {
"active": {
"backgroundColor": "#2D7D9F",
"color": "#FFF",
"fontWeight": "bold"
},
"inactive": {
"backgroundColor": "#389CC7",
"color": "#FFF"
}
}
},
"type": "ia.container.tab"
},
{
"events": {
"component": {
"onSelectionChange": {
"config": {
"script": "\tlines \u003d self.getSibling(\"LineChart\")\n\tbars \u003d self.getSibling(\"BarChart\")\n\ttabIndex \u003d self.getSibling(\"TabContainer\").props.currentTabIndex\n\ttabData \u003d self.view.custom.tabData[tabIndex]\n\tif len(event.data) \u003e 0 and \"chartNamedQuery\" in tabData:\n\t\tif tabData[\"isBar\"]:\n\t\t\tlines.meta.visible \u003d False\n\t\t\tbars.meta.visible \u003d True\n\t\t\t# Apply:\n\t\t\tbars.forceRefresh()\n\t\telse:\n\t\t\tbars.meta.visible \u003d False\n\t\t\tlines.meta.visible \u003d True\n\t\t\t# Apply:\n\t\t\tlines.forceRefresh()\n\telse:\n\t\tlines.meta.visible \u003d False\n\t\tbars.meta.visible \u003d False\n\t\tlines.props.series[0].data \u003d system.dataset.clearDataset(lines.props.series[0].data)\n\t\tbars.props.dataSources.example \u003d system.dataset.clearDataset(bars.props.dataSources.example)"
},
"scope": "G",
"type": "script"
}
},
"dom": {
"onKeyDown": {
"config": {
"script": "\tif event.key \u003d\u003d \"Escape\": # Escape key\n\t\tself.props.selection.selectedColumn \u003d None\n\t\tself.props.selection.selectedRow \u003d None"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Table"
},
"position": {
"height": "calc(100% - 75px)",
"width": "100%",
"y": 75
},
"propConfig": {
"position.height": {
"binding": {
"config": {
"expression": "{../LineChart.meta.visible} || {../BarChart.meta.visible}"
},
"transforms": [
{
"fallback": "calc(100% - 75px)",
"inputType": "scalar",
"mappings": [
{
"input": true,
"output": "calc(40% - 75px/2)"
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "expr"
},
"persistent": true
}
},
"props": {
"cells": {
"style": {
"borderBottomColor": "#D5D5D5",
"borderBottomStyle": "solid",
"borderBottomWidth": "1px",
"borderRightColor": "#D5D5D5",
"borderRightStyle": "solid",
"borderRightWidth": "1px",
"color": "#000",
"fontFamily": "Helvetica",
"fontSize": "14px"
}
},
"columns": [
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"editable": false,
"field": "start_timestamp",
"header": {
"align": "center",
"justify": "center",
"style": {
"classes": "table/column-header"
},
"title": "Start Timestamp"
},
"justify": "center",
"number": "value",
"numberFormat": "none",
"render": "auto",
"resizable": false,
"sortable": true,
"strictWidth": true,
"visible": true,
"width": 150
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"editable": false,
"field": "end_timestamp",
"header": {
"align": "center",
"justify": "center",
"style": {
"classes": "table/column-header"
},
"title": "End Timestamp"
},
"justify": "center",
"number": "value",
"numberFormat": "none",
"render": "auto",
"resizable": false,
"sortable": true,
"strictWidth": true,
"visible": true,
"width": 150
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"editable": false,
"field": "gaylord",
"header": {
"align": "center",
"justify": "center",
"style": {
"classes": "table/column-header"
},
"title": "Gaylord"
},
"justify": "center",
"number": "value",
"numberFormat": "none",
"render": "auto",
"resizable": true,
"sortable": true,
"visible": true
},
{
"align": "center",
"boolean": "checkbox",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"editable": false,
"field": "cycles_count",
"header": {
"align": "center",
"justify": "center",
"style": {
"classes": "table/column-header"
},
"title": "Cycles (#)"
},
"justify": "center",
"number": "value",
"numberFormat": "none",
"render": "auto",
"resizable": true,
"sortable": true,
"visible": true
}
],
"data": {
"$": [
"ds",
192,
1637031280591
],
"$columns": [
{
"data": [],
"name": "start_timestamp",
"type": "Date"
},
{
"data": [],
"name": "end_timestamp",
"type": "Date"
},
{
"data": [],
"name": "gaylord",
"type": "String"
},
{
"data": [],
"name": "cycles_count",
"type": "Double"
},
{
"data": [],
"name": "cycles_cph",
"type": "Double"
},
{
"data": [],
"name": "cycles_percent",
"type": "Double"
}
]
},
"filter": {
"enabled": true
},
"pager": {
"bottom": false
},
"rows": {
"highlight": {
"enabled": false
},
"striped": {
"enabled": false
},
"style": {
"classes": "table/highlight"
}
},
"style": {
"fontFamily": "Helvetica",
"fontSize": "14px",
"fontWeight": "bold",
"zoom": 1
}
},
"scripts": {
"customMethods": [
{
"name": "forceRefresh",
"params": [],
"script": "\t# Collect data:\n\tcurrentTabIndex \u003d self.getSibling(\"TabContainer\").props.currentTabIndex\n\ttabData \u003d self.view.custom.tabData[currentTabIndex]\n\tstartDate \u003d self.session.custom.timewidget.startDate\n\tendDate \u003d self.session.custom.timewidget.endDate\n\tid \u003d self.getSibling(\"Dropdown\").props.value\n\t\n\t# Apply:\n\t#system.perspective.print(\"Table Check: \" + tabData.title)\n\tif (tabData.uniqueNamedQuery \u003d\u003d \"\" or id \u003c\u003e \"\"):\n\t\t#system.perspective.print(\"Table Refresh: \" + tabData.title)\n\t\tparams \u003d {\n\t\t\t\"startDate\": startDate,\n\t\t\t\"endDate\": endDate\n\t\t}\n\t\tif id \u003c\u003e \"\":\n\t\t\tparams[tabData.idField] \u003d id\n\t\tdata \u003d system.db.runNamedQuery(tabData.dataNamedQuery, params)\n\t\t# Create title:\n\t\tcou \u003d utils.getRowCount(data)\n\t\tast \u003d \"*\" if cou \u003e\u003d 1000 else \"\"\n\t\tself.view.custom.titleExtra \u003d \"{:n}{} rows\".format(cou, ast)\n\t\t# Update columns:\n\t\tcolumns \u003d []\n\t\tfilterColumns \u003d self.getSibling(\"Mode\").props.value\n\t\tfor name in data.getColumnNames():\n\t\t\tif name.split(\"_\")[-1] not in filterColumns:\n\t\t\t\textra \u003d {}\n\t\t\t\tif name in [\"start_timestamp\", \"end_timestamp\"]:\n\t\t\t\t\textra[\"resizable\"] \u003d False\n\t\t\t\t\textra[\"strictWidth\"] \u003d True\n\t\t\t\t\textra[\"width\"] \u003d 150\n\t\t\t\telif name in [\"induct\", \"scanner\", \"sorter\", \"lane\"]:\n\t\t\t\t\textra[\"resizable\"] \u003d False\n\t\t\t\t\textra[\"strictWidth\"] \u003d True\n\t\t\t\t\textra[\"width\"] \u003d 80\n\t\t\t\tcolumns.append(reports.generateColumn(name, extra))\n\t\tself.props.columns \u003d columns\n\t\t# Return data\n\t\tself.props.data \u003d data"
}
],
"extensionFunctions": null,
"messageHandlers": []
},
"type": "ia.display.table"
},
{
"meta": {
"name": "Dropdown",
"visible": null
},
"position": {
"height": 36,
"width": 200,
"x": "calc(100% - 205px)",
"y": 80
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"expression": "{../TabContainer.props.currentTabIndex}"
},
"transforms": [
{
"code": "\ttabData \u003d self.view.custom.tabData[value]\n\treturn tabData.uniqueNamedQuery not in [None, \"\"]",
"type": "script"
}
],
"type": "expr"
},
"persistent": true
},
"props.options": {
"binding": {
"config": {
"path": "../TabContainer.props.currentTabIndex"
},
"transforms": [
{
"code": "\ttabData \u003d self.view.custom.tabData[value]\n\tquery \u003d tabData.uniqueNamedQuery\n\tif query not in [None, \"\"]:\n\t\tdata \u003d system.db.runNamedQuery(query)\n\t\tvalues \u003d [data.getValueAt(row, 0) for row in range(data.getRowCount())]\n\t\toptions \u003d []\n\t\tfor val in values:\n\t\t\toptions.append({\n\t\t\t\t\"value\": val,\n\t\t\t\t\"label\": val\n\t\t\t})\n\t\t# Select the first one if no value is selected:\n\t\tif self.props.value not in values and len(values) \u003e 0:\n\t\t\tself.props.value \u003d values[0]\n\t\t# Return list:\n\t\treturn options\n\telse:\n\t\tself.props.value \u003d \"\"\n\t\treturn []",
"type": "script"
}
],
"type": "property"
}
},
"props.value": {
"onChange": {
"enabled": null,
"script": "\tif currentValue.value \u003c\u003e \"\":\n\t\t# Apply\n\t\tself.getSibling(\"Table\").forceRefresh()\n\t\ttabIndex \u003d self.getSibling(\"TabContainer\").props.currentTabIndex\n\t\tif self.view.custom.tabData[tabIndex][\"isBar\"]:\n\t\t\tself.getSibling(\"BarChart\").forceRefresh()\n\t\telse:\n\t\t\tself.getSibling(\"LineChart\").forceRefresh()"
}
}
},
"type": "ia.input.dropdown"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tfilterColumns \u003d self.props.value\n\t# Update columns:\n\ttable \u003d self.getSibling(\"Table\")\n\tcolumns \u003d []\n\tfor name in table.props.data.getColumnNames():\n\t\tif name.split(\"_\")[-1] not in filterColumns:\n\t\t\textra \u003d {}\n\t\t\tif name in [\"start_timestamp\", \"end_timestamp\"]:\n\t\t\t\textra[\"resizable\"] \u003d False\n\t\t\t\textra[\"strictWidth\"] \u003d True\n\t\t\t\textra[\"width\"] \u003d 150\n\t\t\telif name in [\"induct\", \"scanner\", \"sorter\", \"lane\"]:\n\t\t\t\textra[\"resizable\"] \u003d False\n\t\t\t\textra[\"strictWidth\"] \u003d True\n\t\t\t\textra[\"width\"] \u003d 80\n\t\t\tcolumns.append(reports.generateColumn(name, extra))\n\ttable.props.columns \u003d columns\n\t# Update columns:\n\tlines \u003d self.getSibling(\"LineChart\")\n\tdata \u003d lines.props.series[0].data\n\tcolumns \u003d [{\"key\": name} for name in data.getColumnNames() if name.split(\"_\")[-1] not in filterColumns]\n\tlines.props.plots[0].trends[0].columns \u003d columns\n\t# Update columns:\n\tbars \u003d self.getSibling(\"BarChart\")\n\tdata \u003d bars.props.dataSources.example\n\tcolumns \u003d []\n\tfor name in data.getColumnNames():\n\t\tif name.split(\"_\")[-1] not in filterColumns and name not in [\"time\", \"hour\"]:\n\t\t\textra \u003d {\n\t\t\t\t\"xAxis\": \"hour\",\n\t\t\t\t\"yAxis\": \"count\",\n\t\t\t\t\"render\": \"column\"\n\t\t\t}\n\t\t\tseries \u003d reports.generateSeries(name, extra)\n\t\t\tseries[\"data\"][\"source\"] \u003d \"example\"\n\t\t\tseries[\"data\"][\"x\"] \u003d \"hour\"\n\t\t\tseries[\"column\"][\"appearance\"][\"stacked\"] \u003d True\n\t\t\tcolumns.append(series)\n\tbars.props.series \u003d columns"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Mode"
},
"position": {
"height": 20,
"width": 120,
"x": "calc(100% - 230px)",
"y": 10
},
"props": {
"options": [
{
"label": "Count",
"value": [
"pph",
"cph",
"percent"
]
},
{
"label": "Percent",
"value": [
"count",
"pph",
"cph"
]
},
{
"label": "Rate",
"value": [
"count",
"percent"
]
}
],
"search": {
"enabled": false
},
"style": {
"fontSize": "14px"
},
"value": [
"pph",
"cph",
"percent"
]
},
"type": "ia.input.dropdown"
},
{
"meta": {
"name": "ModeLabel"
},
"position": {
"height": 20,
"width": 120,
"x": "calc(100% - 355px)",
"y": 10
},
"props": {
"style": {
"color": "#fff",
"fontSize": "14px",
"textAlign": "right"
},
"text": "Aggregate Mode:"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DropdownLabel",
"visible": null
},
"position": {
"height": 20,
"width": 120,
"x": "calc(100% - 330px)",
"y": 88
},
"propConfig": {
"meta.visible": {
"binding": {
"config": {
"expression": "{../TabContainer.props.currentTabIndex}"
},
"transforms": [
{
"code": "\ttabData \u003d self.view.custom.tabData[value]\n\treturn tabData.uniqueNamedQuery not in [None, \"\"]",
"type": "script"
}
],
"type": "expr"
},
"persistent": true
},
"props.text": {
"binding": {
"config": {
"path": "../TabContainer.props.currentTabIndex"
},
"transforms": [
{
"code": "\ttabData \u003d self.view.custom.tabData[value]\n\tvalue \u003d tabData.uniqueNamedQuery\n\tif value not in [None, \"\"]:\n\t\treturn tabData.idField.title() + \":\"\n\telse:\n\t\treturn \"\"",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"color": "#000",
"fontSize": "14px",
"textAlign": "right"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "LineChart",
"visible": false
},
"position": {
"height": "calc(60% - 75px/2)",
"width": "100%"
},
"propConfig": {
"position.y": {
"binding": {
"config": {
"expression": "if({this.meta.visible},\r\n\t\"calc(40% + 75px/2)\",\r\n\t\"200%\"\r\n)"
},
"type": "expr"
}
},
"props.xTrace.infoBox.dataFormat": {
"binding": {
"config": {
"path": "../Mode.props.value"
},
"transforms": [
{
"code": "\tif \"percent\" not in value:\n\t\treturn \"0.##%\"\n\telse:\n\t\treturn \"0,0.##\"",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"defaultStyles": {
"colorScheme": "Spectral",
"normal": {
"stroke": {
"width": 2
}
}
},
"legend": {
"position": "right",
"visible": true
},
"plots": [
{
"axes": [],
"markers": [],
"trends": [
{
"axis": "",
"baselines": [],
"breakLine": false,
"columns": [
{
"key": "time"
},
{
"key": "total_count"
},
{
"key": "single_carrier_count"
},
{
"key": "double_carrier_count"
}
],
"interpolation": "curveLinear",
"radius": 2,
"series": "Boiler",
"stack": true,
"type": "line",
"visible": true
}
]
}
],
"series": [
{
"data": {
"$": [
"ds",
192,
1636690363196
],
"$columns": [
{
"data": [],
"name": "time",
"type": "Date"
},
{
"data": [],
"name": "total_count",
"type": "Integer"
},
{
"data": [],
"name": "single_carrier_count",
"type": "Integer"
},
{
"data": [],
"name": "double_carrier_count",
"type": "Integer"
},
{
"data": [],
"name": "total_pph",
"type": "Double"
},
{
"data": [],
"name": "single_carrier_pph",
"type": "Double"
},
{
"data": [],
"name": "double_carrier_pph",
"type": "Double"
},
{
"data": [],
"name": "single_carrier/sorter_percent",
"type": "Double"
},
{
"data": [],
"name": "double_carrier/sorter_percent",
"type": "Double"
}
]
},
"name": "Boiler"
}
],
"style": {
"backgroundColor": "#FFF",
"borderTopColor": "#000",
"borderTopStyle": "solid",
"borderTopWidth": "2px"
},
"timeRange": {
"dateFormat": "YYYY-MM-DD",
"timeFormat": "HH:mm:ss"
},
"xTrace": {
"infoBox": {
"dateFormat": "YYYY-MM-DD",
"timeFormat": "HH:mm",
"width": 200
}
}
},
"scripts": {
"customMethods": [
{
"name": "forceRefresh",
"params": [],
"script": "\tif self.meta.visible:\n\t\t# Generate tabData\n\t\tcurrentTabIndex \u003d self.getSibling(\"TabContainer\").props.currentTabIndex\n\t\ttabData \u003d self.view.custom.tabData[currentTabIndex]\n\t\tstartDate \u003d self.session.custom.timewidget.startDate\n\t\tendDate \u003d self.session.custom.timewidget.endDate\n\t\tselected \u003d self.getSibling(\"Table\").props.selection.data\n\t\tidField \u003d tabData[\"idField\"]\n\t\tid \u003d selected[0][idField]\n\t\t\n\t\t# Apply:\n\t\t#system.perspective.print(\"Chart Check: \" + tabData.title + \"|\" + id)\n\t\tif not tabData.isBar:\n\t\t\t#system.perspective.print(\"Chart Refresh: \" + tabData.title + \"|\" + id)\n\t\t\tparams \u003d {\n\t\t\t\t\"startDate\": startDate,\n\t\t\t\t\"endDate\": endDate,\n\t\t\t\tidField: id\n\t\t\t}\n\t\t\tdata \u003d system.db.runNamedQuery(tabData.chartNamedQuery, params)\n\t\t\t# Add breaks:\n\t\t\tbreaks \u003d []\n\t\t\tfor row in range(data.getRowCount()-1):\n\t\t\t\tcurTime \u003d system.date.parse(data.getValueAt(row, \"time\"), \u0027yyyy-MM-dd HH:mm:ss\u0027)\n\t\t\t\tnextTime \u003d system.date.parse(data.getValueAt(row+1, \"time\"), \u0027yyyy-MM-dd HH:mm:ss\u0027)\n\t\t\t\tminBetween \u003d system.date.minutesBetween(curTime, nextTime)\n\t\t\t\tif minBetween \u003e 1:\n\t\t\t\t\tb \u003d []\n\t\t\t\t\tfor col in data.getColumnNames():\n\t\t\t\t\t\tif col \u003c\u003e \"time\":\n\t\t\t\t\t\t\tb.append(0)\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\tnewTime \u003d system.date.addMinutes(curTime, 1)\n\t\t\t\t\t\t\tb.append(system.date.format(newTime, \u0027yyyy-MM-dd HH:mm:ss\u0027))\n\t\t\t\t\tbreaks.append(b)\n\t\t\t\tif minBetween \u003e 2:\n\t\t\t\t\tb \u003d []\n\t\t\t\t\tfor col in data.getColumnNames():\n\t\t\t\t\t\tif col \u003c\u003e \"time\":\n\t\t\t\t\t\t\tb.append(0)\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\tnewTime \u003d system.date.addMinutes(nextTime, -1)\n\t\t\t\t\t\t\tb.append(system.date.format(newTime, \u0027yyyy-MM-dd HH:mm:ss\u0027))\n\t\t\t\t\tbreaks.append(b)\n\t\t\tdata \u003d system.dataset.addRows(data, breaks)\n\t\t\tdata \u003d system.dataset.sort(data, \"time\", True)\n\t\t\t# Update columns:\n\t\t\tfilterColumns \u003d [col for col in self.getSibling(\"Mode\").props.value]\n\t\t\tcolumns \u003d [{\"key\": name} for name in data.getColumnNames() if name.split(\"_\")[-1] not in filterColumns]\n\t\t\tself.props.plots[0].trends[0].columns \u003d columns\n\t\t\t# Return data\n\t\t\tself.props.series[0].data \u003d data"
}
],
"extensionFunctions": null,
"messageHandlers": []
},
"type": "ia.chart.timeseries"
},
{
"meta": {
"name": "BarChart",
"visible": false
},
"position": {
"height": "calc(60% - 75px/2)",
"width": "100%",
"y": "calc(40% + 75px/2)"
},
"propConfig": {
"props.yAxes[0].label.text": {
"binding": {
"config": {
"path": "../Mode.props.value"
},
"transforms": [
{
"code": "\tif \"percent\" not in value:\n\t\treturn \"Percent\"\n\telif \"pph\" not in value:\n\t\treturn \"PPH\"\n\telse:\n\t\treturn \"Count\"",
"type": "script"
}
],
"type": "property"
}
},
"props.yAxes[0].value.format": {
"binding": {
"config": {
"path": "../Mode.props.value"
},
"transforms": [
{
"code": "\tif \"percent\" not in value:\n\t\treturn \"###.##%\"\n\telse:\n\t\treturn \"#,###.##\"",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"dataSources": {
"example": {
"$": [
"ds",
192,
1636690363197
],
"$columns": [
{
"data": [],
"name": "time",
"type": "String"
},
{
"data": [],
"name": "hour",
"type": "String"
},
{
"data": [],
"name": "diverted",
"type": "Double"
},
{
"data": [],
"name": "lane_disabled",
"type": "Double"
},
{
"data": [],
"name": "lane_full",
"type": "Double"
},
{
"data": [],
"name": "lane_jam",
"type": "Double"
}
]
}
},
"series": [
{
"candlestick": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"stacked": false,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
}
},
"high": {
"x": "",
"y": ""
},
"low": {
"x": "",
"y": ""
},
"open": {
"x": "",
"y": ""
}
},
"column": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"height": null,
"stacked": true,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"width": null
},
"open": {
"x": "",
"y": ""
}
},
"data": {
"source": "example",
"x": "hour",
"y": "diverted"
},
"defaultState": {
"visible": true
},
"hiddenInLegend": false,
"label": {
"text": "Diverted"
},
"line": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": false,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"name": "diverted",
"render": "column",
"stepLine": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": true,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"visible": true,
"xAxis": "hour",
"yAxis": "count",
"zIndex": 0
},
{
"candlestick": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"stacked": false,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
}
},
"high": {
"x": "",
"y": ""
},
"low": {
"x": "",
"y": ""
},
"open": {
"x": "",
"y": ""
}
},
"column": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"height": null,
"stacked": true,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"width": null
},
"open": {
"x": "",
"y": ""
}
},
"data": {
"source": "example",
"x": "hour",
"y": "lane_disabled"
},
"defaultState": {
"visible": true
},
"hiddenInLegend": false,
"label": {
"text": "Lane Disabled"
},
"line": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": false,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"name": "lane_disabled",
"render": "column",
"stepLine": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": true,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"visible": true,
"xAxis": "hour",
"yAxis": "count",
"zIndex": 0
},
{
"candlestick": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"stacked": false,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
}
},
"high": {
"x": "",
"y": ""
},
"low": {
"x": "",
"y": ""
},
"open": {
"x": "",
"y": ""
}
},
"column": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"height": null,
"stacked": true,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"width": null
},
"open": {
"x": "",
"y": ""
}
},
"data": {
"source": "example",
"x": "hour",
"y": "lane_full"
},
"defaultState": {
"visible": true
},
"hiddenInLegend": false,
"label": {
"text": "Lane Full"
},
"line": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": false,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"name": "lane_full",
"render": "column",
"stepLine": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": true,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"visible": true,
"xAxis": "hour",
"yAxis": "count",
"zIndex": 0
},
{
"candlestick": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"stacked": false,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
}
},
"high": {
"x": "",
"y": ""
},
"low": {
"x": "",
"y": ""
},
"open": {
"x": "",
"y": ""
}
},
"column": {
"appearance": {
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": "",
"min": ""
},
"height": null,
"stacked": true,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"width": null
},
"open": {
"x": "",
"y": ""
}
},
"data": {
"source": "example",
"x": "hour",
"y": "lane_jam"
},
"defaultState": {
"visible": true
},
"hiddenInLegend": false,
"label": {
"text": "Lane Jam"
},
"line": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": false,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"name": "lane_jam",
"render": "column",
"stepLine": {
"appearance": {
"bullets": [
{
"deriveFieldsFromData": {
"fill": {
"color": "",
"opacity": ""
},
"rotation": "",
"stroke": {
"color": "",
"opacity": "",
"width": ""
}
},
"enabled": true,
"fill": {
"color": "",
"opacity": 1
},
"heatRules": {
"dataField": "",
"enabled": false,
"max": 100,
"min": 2
},
"height": 10,
"label": {
"position": {
"dx": 0,
"dy": 0
},
"text": "{value}"
},
"render": "circle",
"rotation": 0,
"stroke": {
"color": "",
"opacity": 1,
"width": 1
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"width": 10
}
],
"connect": true,
"fill": {
"color": "",
"opacity": 0
},
"minDistance": 0.5,
"stroke": {
"color": "",
"dashArray": "",
"opacity": 1,
"width": 3
},
"tensionX": 1,
"tensionY": 1
},
"open": {
"x": "",
"y": ""
}
},
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": "{name}: [bold]{valueY}[/]"
},
"visible": true,
"xAxis": "hour",
"yAxis": "count",
"zIndex": 0
}
],
"style": {
"backgroundColor": "#FFF",
"borderTopColor": "#000",
"borderTopStyle": "solid",
"borderTopWidth": "2px"
},
"xAxes": [
{
"appearance": {
"font": {
"size": "",
"weight": 500
},
"grid": {
"color": "",
"dashArray": "",
"minDistance": 60,
"opacity": 1,
"position": 0.5
},
"inside": false,
"labels": {
"color": "",
"opacity": 1,
"rotation": 0,
"wrap": true
},
"opposite": false
},
"category": {
"break": {
"enabled": false,
"endCategory": "",
"size": 0.05,
"startCategory": ""
}
},
"date": {
"baseInterval": {
"count": 1,
"enabled": false,
"skipEmptyPeriods": false,
"timeUnit": "hour"
},
"break": {
"enabled": false,
"endDate": "",
"size": 0.05,
"startDate": ""
},
"format": "kk",
"inputFormat": "yyyy-MM-dd kk:mm:ss",
"range": {
"max": "",
"min": "",
"useStrict": false
}
},
"inversed": false,
"label": {
"color": "",
"enabled": true,
"text": "Hour"
},
"name": "hour",
"render": "category",
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": ""
},
"value": {
"break": {
"enabled": false,
"endValue": 100,
"size": 0.05,
"startValue": 0
},
"format": "#,###.##",
"logarithmic": false,
"range": {
"max": "",
"min": "",
"useStrict": false
}
},
"visible": true
}
],
"yAxes": [
{
"appearance": {
"font": {
"size": "",
"weight": 500
},
"grid": {
"color": "",
"dashArray": "",
"minDistance": null,
"opacity": 1,
"position": 0.5
},
"inside": false,
"labels": {
"color": "",
"opacity": 1,
"rotation": 0,
"wrap": true
},
"opposite": false
},
"category": {
"break": {
"enabled": false,
"endCategory": "",
"size": 0.05,
"startCategory": ""
}
},
"date": {
"baseInterval": {
"count": 1,
"enabled": false,
"skipEmptyPeriods": false,
"timeUnit": "hour"
},
"break": {
"enabled": false,
"endDate": "",
"size": 0.05,
"startDate": ""
},
"format": "M/d/yyyy HH:mm:ss",
"inputFormat": "yyyy-MM-dd kk:mm:ss",
"range": {
"max": "",
"min": "",
"useStrict": false
}
},
"inversed": false,
"label": {
"color": "",
"enabled": true
},
"name": "count",
"render": "value",
"tooltip": {
"background": {
"color": "",
"opacity": 1
},
"cornerRadius": 3,
"enabled": true,
"pointerLength": 4,
"text": ""
},
"value": {
"break": {
"enabled": false,
"endValue": 100,
"size": 0.05,
"startValue": 0
},
"logarithmic": false,
"range": {
"max": "",
"min": "",
"useStrict": false
}
},
"visible": true
}
]
},
"scripts": {
"customMethods": [
{
"name": "forceRefresh",
"params": [],
"script": "\tif self.meta.visible:\n\t\t# Generate tabData\n\t\tcurrentTabIndex \u003d self.getSibling(\"TabContainer\").props.currentTabIndex\n\t\ttabData \u003d self.view.custom.tabData[currentTabIndex]\n\t\tstartDate \u003d self.session.custom.timewidget.startDate\n\t\tendDate \u003d self.session.custom.timewidget.endDate\n\t\tidField \u003d tabData.idField\n\t\tid \u003d self.getSibling(\"Dropdown\").props.value\n\t\t\n\t\t# Apply:\n\t\t#system.perspective.print(\"Chart Check: \" + tabData.title + \"|\" + id)\n\t\tif id \u003c\u003e \"\" and tabData.isBar:\n\t\t\t#system.perspective.print(\"Chart Refresh: \" + tabData.title + \"|\" + id)\n\t\t\tparams \u003d {\n\t\t\t\t\"startDate\": startDate,\n\t\t\t\t\"endDate\": endDate,\n\t\t\t\tidField: id\n\t\t\t}\n\t\t\tdata \u003d system.db.runNamedQuery(tabData.chartNamedQuery, params)\n\t\t\t# Update columns:\n\t\t\tfilterColumns \u003d [col for col in self.getSibling(\"Mode\").props.value]\n\t\t\tcolumns \u003d []\n\t\t\tfor name in data.getColumnNames():\n\t\t\t\tif name.split(\"_\")[-1] not in filterColumns and name not in [\"time\", \"hour\"]:\n\t\t\t\t\textra \u003d {\n\t\t\t\t\t\t\"xAxis\": \"hour\",\n\t\t\t\t\t\t\"yAxis\": \"count\",\n\t\t\t\t\t\t\"render\": \"column\"\n\t\t\t\t\t}\n\t\t\t\t\tseries \u003d reports.generateSeries(name, extra)\n\t\t\t\t\tseries[\"data\"][\"source\"] \u003d \"example\"\n\t\t\t\t\tseries[\"data\"][\"x\"] \u003d \"hour\"\n\t\t\t\t\tseries[\"column\"][\"appearance\"][\"stacked\"] \u003d True\n\t\t\t\t\tcolumns.append(series)\n\t\t\tself.props.series \u003d columns\n\t\t\t# Return data\n\t\t\tself.props.dataSources.example \u003d data"
}
],
"extensionFunctions": null,
"messageHandlers": []
},
"type": "ia.chart.xy"
}
],
"meta": {
"name": "root"
},
"props": {
"style": {
"min-width": "1000px",
"overflow": "hidden"
}
},
"type": "ia.container.coord"
}
}