{ "custom": {}, "params": { "titleExtra": "0 rows" }, "props": { "defaultSize": { "height": 600, "width": 1600 } }, "root": { "children": [ { "meta": { "name": "Label" }, "position": { "height": 40, "width": "100%" }, "props": { "style": { "backgroundColor": "#1A4A5E", "borderBottomColor": "#000000", "borderBottomStyle": "solid", "borderBottomWidth": "2px", "color": "#fff", "fontFamily": "Helvetica", "fontSize": 20, "fontWeight": "bold", "textAlign": "center" }, "text": "Commissioning" }, "type": "ia.display.label" }, { "events": { "component": { "onActionPerformed": { "config": { "script": "\ttable \u003d self.getSibling(\"ScannerHistory\")\n\tlines \u003d self.getSibling(\"LineChart\")\n\t# Force CSV download:\n\tutils.downloadCSV(table, \"Commissioning Scanner History\")\n\tutils.downloadCSV(lines.props.series[0].data, \"Commissioning Chart Data\")" }, "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 }, "propConfig": { "meta.visible": { "persistent": true } }, "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": "ScannerHistory" }, "position": { "height": "calc((100% - 40px) / 2)", "width": "100%", "y": "calc((100% - 40px) / 2 + 40px)" }, "propConfig": { "custom.timewidget": { "binding": { "config": { "path": "session.custom.timewidget" }, "type": "property" }, "onChange": { "enabled": null, "script": "\tself.forceRefresh()" } } }, "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": "induct_timestamp", "footer": { "align": "center", "justify": "center", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "center", "style": { "classes": "table/column-header" }, "title": "Induct Timestamp" }, "justify": "center", "number": "value", "numberFormat": "none", "progressBar": { "bar": { "color": "#62A3F6", "linecap": "round", "width": 5 }, "max": 100, "track": { "color": "#DADADA", "linecap": "round", "width": 2 }, "value": { "color": "#7D7D7D", "show": true } }, "render": "auto", "resizable": false, "sortable": true, "strictWidth": true, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "#2196F3", "unselected": "#FFFFFF" } }, "viewParams": {}, "viewPath": "", "visible": false, "width": 160 }, { "align": "center", "boolean": "checkbox", "dateFormat": "YYYY-MM-DD HH:mm:ss", "editable": false, "field": "confirm_timestamp", "footer": { "align": "center", "justify": "center", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "center", "style": { "classes": "table/column-header" }, "title": "Confirm Timestamp" }, "justify": "center", "number": "value", "numberFormat": "none", "progressBar": { "bar": { "color": "#62A3F6", "linecap": "round", "width": 5 }, "max": 100, "track": { "color": "#DADADA", "linecap": "round", "width": 2 }, "value": { "color": "#7D7D7D", "show": true } }, "render": "auto", "resizable": false, "sortable": true, "strictWidth": true, "style": { "classes": "value" }, "toggleSwitch": { "color": { "selected": "#2196F3", "unselected": "#FFFFFF" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 160 }, { "align": "center", "boolean": "checkbox", "dateFormat": "YYYY-MM-DD HH:mm:ss", "editable": false, "field": "sorter", "footer": { "align": "center", "justify": "center", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "center", "style": { "classes": "table/column-header" }, "title": "Sorter" }, "justify": "center", "number": "value", "numberFormat": "none", "progressBar": { "bar": { "color": "#62A3F6", "linecap": "round", "width": 5 }, "max": 100, "track": { "color": "#DADADA", "linecap": "round", "width": 2 }, "value": { "color": "#7D7D7D", "show": true } }, "render": "auto", "resizable": false, "sortable": true, "strictWidth": true, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "#2196F3", "unselected": "#FFFFFF" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 80 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "trackid", "footer": { "align": "center", "justify": "center", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "center", "style": { "classes": "table/column-header" }, "title": "Parcel ID" }, "justify": "center", "number": "value", "numberFormat": "none", "progressBar": { "bar": { "color": "#62A3F6", "linecap": "round", "width": 5 }, "max": 100, "track": { "color": "#DADADA", "linecap": "round", "width": 2 }, "value": { "color": "#7D7D7D", "show": true } }, "render": "auto", "resizable": false, "sortable": true, "strictWidth": true, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "#2196F3", "unselected": "#FFFFFF" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 90 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "scanner", "footer": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "center", "style": { "classes": "table/column-header" }, "title": "Scanner" }, "justify": "center", "number": "value", "numberFormat": "none", "progressBar": { "bar": { "color": "#62A3F6", "linecap": "round", "width": 5 }, "max": 100, "track": { "color": "#DADADA", "linecap": "round", "width": 2 }, "value": { "color": "#7D7D7D", "show": true } }, "render": "auto", "resizable": false, "sort": "none", "sortable": true, "strictWidth": true, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "#2196F3", "unselected": "#FFFFFF" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 90 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "imgid", "footer": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "center", "style": { "classes": "table/column-header" }, "title": "Img ID" }, "justify": "center", "number": "value", "numberFormat": "none", "progressBar": { "bar": { "color": "#62A3F6", "linecap": "round", "width": 5 }, "max": 100, "track": { "color": "#DADADA", "linecap": "round", "width": 2 }, "value": { "color": "#7D7D7D", "show": true } }, "render": "auto", "resizable": false, "sort": "none", "sortable": true, "strictWidth": true, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "#2196F3", "unselected": "#FFFFFF" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 90 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "barcode", "footer": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "center", "style": { "classes": "table/column-header" }, "title": "Scan Label" }, "justify": "center", "number": "value", "numberFormat": "none", "progressBar": { "bar": { "color": "#62A3F6", "linecap": "round", "width": 5 }, "max": 100, "track": { "color": "#DADADA", "linecap": "round", "width": 2 }, "value": { "color": "#7D7D7D", "show": true } }, "render": "auto", "resizable": true, "sort": "none", "sortable": true, "strictWidth": true, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "#2196F3", "unselected": "#FFFFFF" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 160 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "scanner_status", "footer": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "center", "style": { "classes": "table/column-header" }, "title": "Scan Status" }, "justify": "center", "number": "value", "numberFormat": "none", "progressBar": { "bar": { "color": "#62A3F6", "linecap": "round", "width": 5 }, "max": 100, "track": { "color": "#DADADA", "linecap": "round", "width": 2 }, "value": { "color": "#7D7D7D", "show": true } }, "render": "auto", "resizable": true, "sort": "none", "sortable": true, "strictWidth": false, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "#2196F3", "unselected": "#FFFFFF" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 50 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "pkg_length", "footer": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "center", "style": { "classes": "table/column-header" }, "title": "Length (in)" }, "justify": "center", "number": "value", "numberFormat": "none", "progressBar": { "bar": { "color": "#62A3F6", "linecap": "round", "width": 5 }, "max": 100, "track": { "color": "#DADADA", "linecap": "round", "width": 2 }, "value": { "color": "#7D7D7D", "show": true } }, "render": "auto", "resizable": true, "sort": "none", "sortable": true, "strictWidth": false, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "#2196F3", "unselected": "#FFFFFF" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 50 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "trays", "footer": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "center", "style": { "classes": "table/column-header" }, "title": "Trays (#)" }, "justify": "center", "number": "value", "numberFormat": "none", "progressBar": { "bar": { "color": "#62A3F6", "linecap": "round", "width": 5 }, "max": 100, "track": { "color": "#DADADA", "linecap": "round", "width": 2 }, "value": { "color": "#7D7D7D", "show": true } }, "render": "auto", "resizable": true, "sort": "none", "sortable": true, "strictWidth": false, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "#2196F3", "unselected": "#FFFFFF" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 50 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "assignments", "footer": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "center", "style": { "classes": "table/column-header" }, "title": "Assignment" }, "justify": "center", "number": "value", "numberFormat": "none", "progressBar": { "bar": { "color": "#62A3F6", "linecap": "round", "width": 5 }, "max": 100, "track": { "color": "#DADADA", "linecap": "round", "width": 2 }, "value": { "color": "#7D7D7D", "show": true } }, "render": "auto", "resizable": true, "sort": "none", "sortable": true, "strictWidth": false, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "#2196F3", "unselected": "#FFFFFF" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 50 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "divert_status", "footer": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "center", "style": { "classes": "table/column-header" }, "title": "Divert Status" }, "justify": "center", "number": "value", "numberFormat": "none", "progressBar": { "bar": { "color": "#62A3F6", "linecap": "round", "width": 5 }, "max": 100, "track": { "color": "#DADADA", "linecap": "round", "width": 2 }, "value": { "color": "#7D7D7D", "show": true } }, "render": "auto", "resizable": true, "sort": "none", "sortable": true, "strictWidth": false, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "#2196F3", "unselected": "#FFFFFF" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 50 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "requested_dest", "footer": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "center", "style": { "classes": "table/column-header" }, "title": "Req Dest" }, "justify": "center", "number": "value", "numberFormat": "none", "progressBar": { "bar": { "color": "#62A3F6", "linecap": "round", "width": 5 }, "max": 100, "track": { "color": "#DADADA", "linecap": "round", "width": 2 }, "value": { "color": "#7D7D7D", "show": true } }, "render": "auto", "resizable": true, "sort": "none", "sortable": true, "strictWidth": false, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "#2196F3", "unselected": "#FFFFFF" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 40 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "diverted_dest", "footer": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "center", "style": { "classes": "table/column-header" }, "title": "Actual Dest" }, "justify": "center", "number": "value", "numberFormat": "none", "progressBar": { "bar": { "color": "#62A3F6", "linecap": "round", "width": 5 }, "max": 100, "track": { "color": "#DADADA", "linecap": "round", "width": 2 }, "value": { "color": "#7D7D7D", "show": true } }, "render": "auto", "resizable": true, "sort": "none", "sortable": true, "strictWidth": false, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "#2196F3", "unselected": "#FFFFFF" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 40 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "sort_code", "footer": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "center", "style": { "classes": "table/column-header" }, "title": "Sort Code" }, "justify": "center", "number": "value", "numberFormat": "none", "progressBar": { "bar": { "color": "#62A3F6", "linecap": "round", "width": 5 }, "max": 100, "track": { "color": "#DADADA", "linecap": "round", "width": 2 }, "value": { "color": "#7D7D7D", "show": true } }, "render": "auto", "resizable": true, "sort": "none", "sortable": true, "strictWidth": false, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "#2196F3", "unselected": "#FFFFFF" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 50 } ], "filter": { "enabled": true }, "pager": { "bottom": false }, "rows": { "highlight": { "enabled": false }, "striped": { "enabled": false }, "style": { "classes": "table/highlight" } }, "style": { "fontFamily": "Helvetica", "fontSize": "14px", "fontWeight": "bold" } }, "scripts": { "customMethods": [ { "name": "forceRefresh", "params": [], "script": "\tRED \u003d lambda x: { \"value\": x, \"style\": { \"background\": \"#FEA3AA\" } }\n\tYELLOW \u003d lambda x: { \"value\": x, \"style\": { \"background\": \"#FAF884\" } }\n\t\n\t# Run query:\n\tdata \u003d system.db.runNamedQuery(\"Status/PackageHistory\", {\n\t\t\"startDate\": self.session.custom.timewidget.startDate,\n\t\t\"endDate\": self.session.custom.timewidget.endDate,\n\t})\n\t# Convert to JSON:\n\tfilteredData \u003d utils.datasetToJSON(data)\n\t# Apply styles:\n\tfor row in filteredData:\n\t\t# Handle sort code:\n\t\tif row[\"sort_code\"] !\u003d \"Success\":\n\t\t\trow[\"sort_code\"] \u003d RED(row[\"sort_code\"])\n\t\t# Handle barcode:\n\t\tif row[\"scanner_status\"] !\u003d \"Good Read\":\n\t\t\trow[\"scanner_status\"] \u003d RED(row[\"scanner_status\"])\n\t\t\trow[\"barcode\"] \u003d RED(row[\"barcode\"])\n\t\t# Handle destinations:\n\t\tif len(row[\"assignments\"]) \u003e 0:\n\t\t\tDESTS \u003d row[\"assignments\"].split(\",\")\n\t\t\tif row[\"requested_dest\"] not in DESTS:\n\t\t\t\trow[\"requested_dest\"] \u003d RED(row[\"requested_dest\"])\n\t\t\telif row[\"requested_dest\"] !\u003d DESTS[0]:\n\t\t\t\trow[\"requested_dest\"] \u003d YELLOW(row[\"requested_dest\"])\n\t\t\tif row[\"diverted_dest\"] not in DESTS:\n\t\t\t\trow[\"diverted_dest\"] \u003d RED(row[\"diverted_dest\"])\n\t\t\telif row[\"diverted_dest\"] !\u003d DESTS[0]:\n\t\t\t\trow[\"diverted_dest\"] \u003d YELLOW(row[\"diverted_dest\"])\n\t\telse:\n\t\t\trow[\"assignments\"] \u003d RED(row[\"assignments\"])\n\t# Set title extra:\n\tcou \u003d utils.getRowCount(filteredData)\n\tast \u003d \"*\" if cou \u003e\u003d 4000 else \"\"\n\tself.view.params.titleExtra \u003d \"{:n}{} rows\".format(cou, ast)\n\t# Set data\n\tself.props.data \u003d filteredData" } ], "extensionFunctions": null, "messageHandlers": [ { "messageType": "export-data", "pageScope": true, "script": "\tutils.downloadCSV(self, \"Scanner History\")", "sessionScope": false, "viewScope": false } ] }, "type": "ia.display.table" }, { "custom": { "plot1": [ { "axes": [ { "alignment": "left", "label": { "font": { "color": "", "size": 12 }, "offset": 0, "style": { "classes": "" }, "text": "Rate (PPH)", "visible": true }, "max": "", "min": 0, "name": "Rate", "style": { "classes": "" }, "tick": { "color": "", "label": { "font": { "color": "", "size": 10 }, "style": { "classes": "" } }, "style": { "classes": "" } }, "width": 60 }, { "alignment": "right", "label": { "font": { "color": "", "size": 12 }, "offset": 0, "style": { "classes": "" }, "text": "Percent (%)", "visible": true }, "max": 1, "min": 0, "name": "Percent", "style": { "classes": "" }, "tick": { "color": "", "label": { "font": { "color": "", "size": 10 }, "style": { "classes": "" } }, "style": { "classes": "" } }, "width": 60 } ], "markers": [ { "axis": "Rate", "line": { "color": "", "dashArray": 0, "label": { "font": { "color": "", "size": 10 }, "position": "right", "style": { "classes": "" }, "text": "" }, "opacity": 0.5, "style": { "classes": "" }, "width": 1 }, "type": "line", "visible": true } ], "trends": [ { "axis": "Rate", "baselines": [], "breakLine": true, "columns": [ { "color": "", "key": "time", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } }, { "color": "#000000", "key": "total_pph", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } } ], "interpolation": "curveLinear", "radius": 2, "series": "Data", "stack": true, "type": "line", "visible": true }, { "axis": "Percent", "baselines": [], "breakLine": true, "columns": [ { "color": "", "key": "time", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } }, { "color": "", "key": "no_read_percent", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } }, { "color": "", "key": "no_code_percent", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } }, { "color": "", "key": "multi_label_percent", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } } ], "interpolation": "curveLinear", "radius": 2, "series": "Data", "stack": true, "type": "line", "visible": true }, { "axis": "Percent", "baselines": [], "breakLine": true, "columns": [ { "color": "", "key": "time", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } }, { "color": "", "key": "gap_err_percent", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } }, { "color": "", "key": "div_fail_percent", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } }, { "color": "", "key": "dest_none_percent", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } }, { "color": "", "key": "lost_percent", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } } ], "interpolation": "curveLinear", "radius": 2, "series": "Data", "stack": true, "type": "line", "visible": true } ] } ], "plot3": [ { "axes": [ { "alignment": "left", "label": { "font": { "color": "", "size": 12 }, "offset": 0, "style": { "classes": "" }, "text": "Rate (PPH)", "visible": true }, "max": "", "min": 0, "name": "Rate", "style": { "classes": "" }, "tick": { "color": "", "label": { "font": { "color": "", "size": 10 }, "style": { "classes": "" } }, "style": { "classes": "" } }, "width": 60 } ], "markers": [ { "axis": "Rate", "line": { "color": "", "dashArray": 0, "label": { "font": { "color": "", "size": 10 }, "position": "right", "style": { "classes": "" }, "text": "" }, "opacity": 0.5, "style": { "classes": "" }, "width": 1 }, "type": "line", "visible": true } ], "trends": [ { "axis": "Rate", "baselines": [], "breakLine": true, "columns": [ { "color": "", "key": "time", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } }, { "color": "#000000", "key": "total_pph", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } } ], "interpolation": "curveLinear", "radius": 2, "series": "Data", "stack": true, "type": "line", "visible": true } ] }, { "axes": [ { "alignment": "left", "label": { "font": { "color": "", "size": 12 }, "offset": 0, "style": { "classes": "" }, "text": "Percent (%)", "visible": true }, "max": 1, "min": 0, "name": "Percent", "style": { "classes": "" }, "tick": { "color": "", "label": { "font": { "color": "", "size": 10 }, "style": { "classes": "" } }, "style": { "classes": "" } }, "width": 60 } ], "markers": [], "trends": [ { "axis": "Percent", "baselines": [], "breakLine": true, "columns": [ { "color": "", "key": "time", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } }, { "color": "", "key": "no_read_percent", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } }, { "color": "", "key": "no_code_percent", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } }, { "color": "", "key": "multi_label_percent", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } } ], "interpolation": "curveLinear", "radius": 2, "series": "Data", "stack": true, "type": "line", "visible": true } ] }, { "axes": [ { "alignment": "left", "label": { "font": { "color": "", "size": 12 }, "offset": 0, "style": { "classes": "" }, "text": "Percent (%)", "visible": true }, "max": 1, "min": 0, "name": "Percent", "style": { "classes": "" }, "tick": { "color": "", "label": { "font": { "color": "", "size": 10 }, "style": { "classes": "" } }, "style": { "classes": "" } }, "width": 60 } ], "markers": [], "trends": [ { "axis": "Percent", "baselines": [], "breakLine": true, "columns": [ { "color": "", "key": "time", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } }, { "color": "", "key": "gap_err_percent", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } }, { "color": "", "key": "div_fail_percent", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } }, { "color": "", "key": "dest_none_percent", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } }, { "color": "", "key": "lost_percent", "styles": { "highlighted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "muted": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "normal": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } }, "selected": { "fill": { "color": "", "opacity": null }, "stroke": { "color": "", "dashArray": null, "opacity": null, "width": null } } } } ], "interpolation": "curveLinear", "radius": 2, "series": "Data", "stack": true, "type": "line", "visible": true } ] } ] }, "meta": { "name": "LineChart" }, "position": { "height": "calc((100% - 40px)/2)", "width": "100%", "y": "40px" }, "propConfig": { "custom.plot1[0].markers[0].value": { "binding": { "config": { "path": "../TargetRate.props.value" }, "type": "property" } }, "custom.plot3[0].markers[0].value": { "binding": { "config": { "path": "../TargetRate.props.value" }, "type": "property" } }, "props.plots": { "binding": { "config": { "expression": "if({../CheckboxSplitChart.props.selected},\r\n {this.custom.plot3},\r\n {this.custom.plot1}\r\n)" }, "type": "expr" } }, "props.series[0].data": { "binding": { "config": { "parameters": { "endDate": "{session.custom.timewidget.endDate}", "movAvgMin": "if({../CheckboxMovAvg.props.selected},\r 4,\r 0\r )", "sorter": "\"S01\"", "startDate": "{session.custom.timewidget.startDate}" }, "queryPath": "Commission/StatsChart" }, "type": "query" } } }, "props": { "defaultStyles": { "colorScheme": "Spectral", "normal": { "stroke": { "width": 2 } } }, "legend": { "position": "right", "visible": true }, "series": [ { "name": "Data" } ], "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": "CheckboxMovAvg" }, "position": { "height": 40, "width": 130, "x": "calc(100% - 260px)" }, "props": { "selected": true, "style": { "color": "#FFF" }, "text": "Moving Avg", "textPosition": "left" }, "type": "ia.input.checkbox" }, { "meta": { "name": "CheckboxSplitChart" }, "position": { "height": 40, "width": 130, "x": "calc(100% - 400px)" }, "props": { "style": { "color": "#FFF" }, "text": "Split Chart", "textPosition": "left" }, "type": "ia.input.checkbox" }, { "meta": { "name": "TargetRate" }, "position": { "height": 32, "width": 70, "x": "calc(100% - 75px)", "y": "calc((100% - 40px) / 2 + 50px)" }, "propConfig": { "props.style.backgroundColor": { "binding": { "config": { "expression": "if(toInt({parent.custom.rateIndicator}[\"total_pph\"], 0) \u003e\u003d {this.props.value},\r\n\t\"#A9D08E\",\r\n\t\"#F4B084\"\r\n)" }, "type": "expr" } }, "props.value": { "binding": { "config": { "bidirectional": true, "fallbackDelay": 0.5, "mode": "direct", "tagPath": "[default]MCP20_Custom/SO01_Target_Rate" }, "type": "tag" } } }, "type": "ia.input.numeric-entry-field" }, { "meta": { "name": "Label_RateTarget" }, "position": { "height": 32, "width": 100, "x": "calc(100% - 180px)", "y": "calc((100% - 40px) / 2 + 50px)" }, "props": { "style": { "textAlign": "right" }, "text": "Rate Target:" }, "type": "ia.display.label" }, { "meta": { "name": "TargetSorter" }, "position": { "height": 32, "width": 45, "x": "calc(100% - 225px)", "y": "calc((100% - 40px) / 2 + 50px)" }, "propConfig": { "props.style.backgroundColor": { "binding": { "config": { "expression": "if(toInt({parent.custom.rateIndicator}[\"sorter\"], 0) \u003e\u003d {this.props.value},\r\n\t\"#A9D08E\",\r\n\t\"#F4B084\"\r\n)" }, "type": "expr" } } }, "props": { "enabled": false, "format": "0.##%", "value": 0.01 }, "type": "ia.input.numeric-entry-field" }, { "meta": { "name": "Label_TargetSorter" }, "position": { "height": 32, "width": 110, "x": "calc(100% - 340px)", "y": "calc((100% - 40px) / 2 + 50px)" }, "props": { "style": { "textAlign": "right" }, "text": "Sorter Target:" }, "type": "ia.display.label" }, { "meta": { "name": "TargetScanner" }, "position": { "height": 32, "width": 45, "x": "calc(100% - 385px)", "y": "calc((100% - 40px) / 2 + 50px)" }, "propConfig": { "props.style.backgroundColor": { "binding": { "config": { "expression": "if(toInt({parent.custom.rateIndicator}[\"scanner\"], 0) \u003e\u003d {this.props.value},\r\n\t\"#A9D08E\",\r\n\t\"#F4B084\"\r\n)" }, "type": "expr" } } }, "props": { "enabled": false, "format": "0.##%", "value": 0.02 }, "type": "ia.input.numeric-entry-field" }, { "meta": { "name": "Label_TargetScanner" }, "position": { "height": 32, "width": 170, "x": "calc(100% - 560px)", "y": "calc((100% - 40px) / 2 + 50px)" }, "props": { "style": { "textAlign": "right" }, "text": "Problem Solve Target:" }, "type": "ia.display.label" } ], "meta": { "name": "root" }, "propConfig": { "custom.rateIndicator": { "binding": { "config": { "parameters": { "endDate": "{session.custom.timewidget.endDate}", "movAvgMin": "4", "sorter": "\"S01\"", "startDate": "{session.custom.timewidget.startDate}" }, "queryPath": "Commission/StatsConditions" }, "type": "query" } } }, "props": { "style": { "min-width": "1000px" } }, "type": "ia.container.coord" } }