{
  "custom": {},
  "params": {
    "allowLimitEdit": false,
    "configuring": false,
    "equipmentPath": "Enterprise\\El Dorado Hills\\Packaging Area\\Packaging Line 1\\Inspection Station 1",
    "sasName": "Nonconformity - CpPp",
    "showTable": false,
    "timePeriod": "Current Shift",
    "title": "Process Capability and Performance"
  },
  "propConfig": {
    "params.allowLimitEdit": {
      "paramDirection": "inout",
      "persistent": true
    },
    "params.configuring": {
      "onChange": {
        "enabled": null,
        "script": "\tviewParams\u003dself.params\n\tconfigParams\u003dself.getChild(\"root/configuration\").props.params\n\tif currentValue.value:\n\t\tconfigParams.equipmentPathIn \u003d viewParams.equipmentPath\t\n\t\tconfigParams.timePeriodIn \u003d viewParams.timePeriod\n\t\tconfigParams.titleIn \u003d viewParams.title\n\t\tconfigParams.sasNameIn \u003d viewParams.sasName\n\t\t\n\t\tconfigParams.allowLimitEditIn \u003d viewParams.allowLimitEdit\n\t\tconfigParams.showTableIn \u003d viewParams.showTable\n\t\t\t\t\t\t\n\telif previousValue is not None and previousValue.value:\n\t\tviewParams.equipmentPath \u003d configParams.equipmentPathOut\n\t\tviewParams.timePeriod \u003d configParams.timePeriodOut\n\t\tviewParams.title \u003d configParams.titleOut \n\t\tviewParams.sasName \u003d configParams.sasNameOut\n\t\t\n\t\tviewParams.allowLimitEdit \u003d configParams.allowLimitEditOut \n\t\tviewParams.showTable \u003d configParams.showTableOut"
      },
      "paramDirection": "input",
      "persistent": true
    },
    "params.equipmentPath": {
      "paramDirection": "inout",
      "persistent": true
    },
    "params.sasName": {
      "paramDirection": "inout",
      "persistent": true
    },
    "params.showTable": {
      "paramDirection": "inout",
      "persistent": true
    },
    "params.timePeriod": {
      "paramDirection": "inout",
      "persistent": true
    },
    "params.title": {
      "paramDirection": "inout",
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "height": 450,
      "width": 700
    }
  },
  "root": {
    "children": [
      {
        "children": [
          {
            "meta": {
              "name": "title"
            },
            "position": {
              "shrink": 0
            },
            "propConfig": {
              "position.display": {
                "binding": {
                  "config": {
                    "expression": "coalesce({view.params.title},\u0027\u0027)!\u003d\u0027\u0027"
                  },
                  "type": "expr"
                }
              },
              "props.params.text": {
                "binding": {
                  "config": {
                    "path": "view.params.title"
                  },
                  "type": "property"
                }
              }
            },
            "props": {
              "path": "Page/Embedded/Widget Title"
            },
            "type": "ia.display.view"
          },
          {
            "meta": {
              "name": "spcController"
            },
            "position": {
              "basis": "64px"
            },
            "propConfig": {
              "custom.end": {
                "binding": {
                  "config": {
                    "fallbackDelay": 2.5,
                    "mode": "expression",
                    "tagPath": "runScript(\u0027shared.mes.schedule.getTagPathForTimePeriodEnd\u0027, 0, {view.params.timePeriod}, {view.params.equipmentPath})"
                  },
                  "type": "tag"
                }
              },
              "custom.start": {
                "binding": {
                  "config": {
                    "fallbackDelay": 2.5,
                    "mode": "expression",
                    "tagPath": "runScript(\u0027shared.mes.schedule.getTagPathForTimePeriodStart\u0027, 0, {view.params.timePeriod}, {view.params.equipmentPath})"
                  },
                  "type": "tag"
                }
              },
              "custom.update": {
                "binding": {
                  "config": {
                    "struct": {
                      "end": "{this.custom.end}",
                      "eqPath": "{view.params.equipmentPath}",
                      "period": "{view.params.timePeriod}",
                      "start": "{this.custom.start}"
                    },
                    "waitOnAll": true
                  },
                  "transforms": [
                    {
                      "code": "\tself.props.endDate  \u003d value[\"end\"]\n\tself.props.startDate \u003d value[\"start\"]\n\treturn value",
                      "type": "script"
                    }
                  ],
                  "type": "expr-struct"
                }
              },
              "props.spcChartSettings.endDate": {
                "binding": {
                  "config": {
                    "path": "this.custom.end"
                  },
                  "type": "property"
                }
              },
              "props.spcChartSettings.startDate": {
                "binding": {
                  "config": {
                    "path": "this.custom.start"
                  },
                  "type": "property"
                }
              },
              "props.spcChartSettings.storedSPCName": {
                "binding": {
                  "config": {
                    "path": "view.params.sasName"
                  },
                  "type": "property"
                }
              }
            },
            "props": {
              "endDate": {
                "$": [
                  "ts",
                  192,
                  1692397918468
                ],
                "$ts": 1692397918436
              },
              "spcChartSettings": {
                "autoRefresh": true,
                "autoUpdate": true,
                "settings": {
                  "attributeName": "Color",
                  "boxAndWhiskerFilter": [
                    ""
                  ],
                  "controlLimits": [
                    ""
                  ],
                  "definitionName": "Nonconformity",
                  "filters": {
                    "factors": {},
                    "location": "Enterprise\\El Dorado Hills\\Packaging Area\\Packaging Line 1\\Inspection Station 1"
                  },
                  "measurement": "Measurement 1",
                  "nonconformingFilter": [
                    "Failed Units"
                  ],
                  "nonconformityFilter": [
                    "Color",
                    "Fill Level",
                    "Clarity"
                  ],
                  "paretoFilter": [
                    "Color",
                    "Failed Units",
                    "Fill Level",
                    "Clarity"
                  ],
                  "signals": [
                    ""
                  ],
                  "spcDataFormat": "Process Capability and Performance"
                },
                "spcData": {
                  "$": [
                    "ds",
                    192,
                    1692397918753
                  ],
                  "$columns": []
                },
                "spcResults": {
                  "definitionUUID": "6013348f-64fb-41e8-a23b-c5954677e044",
                  "measurementCount": 0
                }
              },
              "startDate": {
                "$": [
                  "ts",
                  192,
                  1692397918469
                ],
                "$ts": 1692370800000
              }
            },
            "type": "mes.spc.spcController"
          },
          {
            "meta": {
              "name": "Process Capability and Performance"
            },
            "position": {
              "basis": "500px",
              "grow": 1
            },
            "propConfig": {
              "props.enableControlLimitEditing": {
                "binding": {
                  "config": {
                    "path": "view.params.allowLimitEdit"
                  },
                  "type": "property"
                }
              },
              "props.showTitle": {
                "binding": {
                  "config": {
                    "path": "this.props.enableControlLimitEditing"
                  },
                  "type": "property"
                }
              },
              "props.spcChartSettings": {
                "binding": {
                  "config": {
                    "path": "../spcController.props.spcChartSettings"
                  },
                  "type": "property"
                }
              }
            },
            "props": {
              "chartDataStyle": {
                "barColor": "#437AB3",
                "barSpacing": 0.15
              },
              "controlLimitStyle": {
                "cPLCLColor": "#D48232",
                "cPUCLColor": "#D48232",
                "pPLCLColor": "#D3BB2A",
                "pPUCLColor": "#D3BB2A"
              },
              "curveStyle": {
                "cPBellCurveColor": "#4C9C2E",
                "pPBellCurveColor": "#004A98"
              },
              "propertySource": "Use_binding",
              "storedSettings": {
                "endDate": {
                  "$": [
                    "ts",
                    192,
                    1668548344994
                  ],
                  "$ts": 1668465936071
                },
                "startDate": {
                  "$": [
                    "ts",
                    192,
                    1668548344994
                  ],
                  "$ts": 1668465936071
                }
              },
              "xAxisVerticalTickLabels": true
            },
            "type": "mes.spc.mesProcessCapabilityAndPerformanceChart"
          },
          {
            "meta": {
              "name": "Label"
            },
            "position": {
              "basis": "32px"
            },
            "propConfig": {
              "props.text": {
                "binding": {
                  "config": {
                    "path": "../spcController.props.spcChartSettings.spcData"
                  },
                  "transforms": [
                    {
                      "code": "\tif value.getRowCount() \u003e 0:\n\t\treturn \u0027Cpk: \u0027 + str(round(value.getValueAt(0,\u0027Cpk\u0027),2)) + \u0027 | Ppk: \u0027 + str(round(value.getValueAt(0,\u0027Ppk\u0027),2))\n\telse:\n\t\treturn \u0027No Data\u0027",
                      "type": "script"
                    }
                  ],
                  "type": "property"
                }
              }
            },
            "props": {
              "textStyle": {
                "fontFamily": "Roboto",
                "fontWeight": "bold"
              }
            },
            "type": "ia.display.label"
          },
          {
            "meta": {
              "name": "timePeriodLabel"
            },
            "position": {
              "basis": "25px"
            },
            "propConfig": {
              "position.display": {
                "binding": {
                  "config": {
                    "struct": {
                      "eqPath": "{view.params.equipmentPath}",
                      "timePeriod": "{view.params.timePeriod}"
                    },
                    "waitOnAll": true
                  },
                  "transforms": [
                    {
                      "code": "\tif value[\"eqPath\"] \u003d\u003d None or value[\"eqPath\"] \u003d\u003d \"\" or value[\"timePeriod\"] \u003d\u003d \"\" or value[\"timePeriod\"] \u003d\u003d None:\n\t\treturn False \n\treturn True",
                      "type": "script"
                    }
                  ],
                  "type": "expr-struct"
                }
              },
              "props.text": {
                "binding": {
                  "config": {
                    "path": "view.params.timePeriod"
                  },
                  "transforms": [
                    {
                      "code": "\treturn \"(Based on \" +value + \")\"",
                      "type": "script"
                    }
                  ],
                  "type": "property"
                }
              }
            },
            "props": {
              "style": {
                "color": "#808080",
                "fontFamily": "Roboto",
                "fontSize": 12,
                "textAlign": "center"
              }
            },
            "type": "ia.display.label"
          }
        ],
        "meta": {
          "name": "runtime"
        },
        "position": {
          "basis": "200px",
          "grow": 1,
          "shrink": 0
        },
        "propConfig": {
          "position.display": {
            "binding": {
              "config": {
                "expression": "!{view.params.configuring}"
              },
              "type": "expr"
            },
            "persistent": true
          }
        },
        "props": {
          "direction": "column",
          "style": {
            "overflow": "hidden"
          }
        },
        "type": "ia.container.flex"
      },
      {
        "meta": {
          "name": "configuration"
        },
        "position": {
          "basis": "320px",
          "display": false,
          "grow": 1
        },
        "propConfig": {
          "position.display": {
            "binding": {
              "config": {
                "path": "view.params.configuring"
              },
              "type": "property"
            },
            "persistent": true
          },
          "props.params.equipmentPathIn": {
            "persistent": true
          },
          "props.params.timePeriodIn": {
            "persistent": true
          }
        },
        "props": {
          "params": {
            "allowLimitEditIn": false,
            "allowLimitEditOut": false,
            "equipmentPathIn": "Enterprise\\El Dorado Hills\\Packaging Area\\Packaging Line 1\\Inspection Station 1",
            "equipmentPathOut": "",
            "sasNameIn": "Diameter - Histogram",
            "sasNameOut": "Diameter - Histogram",
            "showTableIn": false,
            "showTableOut": false,
            "timePeriodIn": "Current Shift",
            "timePeriodOut": "Current Shift",
            "titleIn": "Histogram",
            "titleOut": "Histogram"
          },
          "path": "Page/Widgets/Configuration/Location Equipment Path, Time Period, Title"
        },
        "type": "ia.display.view"
      }
    ],
    "meta": {
      "name": "root"
    },
    "props": {
      "direction": "column",
      "style": {
        "overflow": "hidden"
      }
    },
    "type": "ia.container.flex"
  }
}