{
  "custom": {
    "now": {
      "$": [
        "ts",
        192,
        1694627637845
      ],
      "$ts": 1694652837000
    },
    "percentage": 1
  },
  "params": {
    "Begin": {
      "$": [
        "ts",
        192,
        1665163935105
      ],
      "$ts": 1665096641000
    },
    "End": {
      "$": [
        "ts",
        192,
        1665163924575
      ],
      "$ts": 1665298740000
    },
    "idealCount": 100,
    "timeLinetype": "production",
    "varianceCount": -5,
    "variancePercentage": 0.1
  },
  "propConfig": {
    "custom.now": {
      "binding": {
        "config": {
          "expression": "now(1000)"
        },
        "transforms": [
          {
            "formatType": "datetime",
            "formatValue": {
              "date": "short",
              "time": "medium"
            },
            "type": "format"
          },
          {
            "code": "\tdate \u003d system.date.parse(str(value), \u0027MM/dd/yy, hh:mm:ss a\u0027)\n\treturn date",
            "type": "script"
          }
        ],
        "type": "expr"
      },
      "persistent": true
    },
    "custom.percentage": {
      "binding": {
        "config": {
          "struct": {
            "Begin": "{view.params.Begin}",
            "End": "{view.params.End}",
            "Now": "{view.custom.now}"
          },
          "waitOnAll": true
        },
        "transforms": [
          {
            "code": "\n\t\tBegin \u003d value[\"Begin\"]\n\t\tEnd \u003d value[\"End\"]\n\n\t\tNow \u003d value[\"Now\"]\n\t\n\t\tBeginToEndSec \u003d system.date.secondsBetween(Begin, End)\n\t\tstartToNowSeconds \u003d system.date.secondsBetween(Begin, Now)\n\n\t\tself.getChild(\"root\").getChild(\"timeFlex\").getChild(\"TextContainer\").getChild(\"unites\").props.text\u003d \"{:,}\".format( int(-startToNowSeconds)) + \" Minutes\"\n\n\n\t\tpercent \u003d float(startToNowSeconds) / BeginToEndSec\n\t\t\n\t\tif percent \u003c 1:\n\t\t\treturn percent\n\n\t\treturn 1",
            "type": "script"
          }
        ],
        "type": "expr-struct"
      },
      "persistent": true
    },
    "params.Begin": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.End": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.idealCount": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.timeLinetype": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.varianceCount": {
      "paramDirection": "input",
      "persistent": true
    },
    "params.variancePercentage": {
      "paramDirection": "input",
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "height": 263,
      "width": 420
    }
  },
  "root": {
    "children": [
      {
        "children": [
          {
            "meta": {
              "name": "leftSpacing"
            },
            "position": {
              "shrink": 0
            },
            "propConfig": {
              "position.grow": {
                "binding": {
                  "config": {
                    "path": "view.custom.percentage"
                  },
                  "type": "property"
                }
              }
            },
            "type": "ia.container.coord"
          },
          {
            "children": [
              {
                "meta": {
                  "name": "Label"
                },
                "position": {
                  "basis": "20px",
                  "shrink": 0
                },
                "props": {
                  "style": {
                    "fontFamily": "Roboto",
                    "fontSize": "12px"
                  },
                  "text": "Target",
                  "textStyle": {
                    "textAlign": "center"
                  }
                },
                "type": "ia.display.label"
              },
              {
                "meta": {
                  "name": "Units"
                },
                "position": {
                  "basis": "20px",
                  "shrink": 0
                },
                "propConfig": {
                  "props.text": {
                    "binding": {
                      "config": {
                        "path": "view.params.idealCount"
                      },
                      "transforms": [
                        {
                          "code": "\n\treturn \"{:,}\".format( int(value)) + \" Units\"",
                          "type": "script"
                        }
                      ],
                      "type": "property"
                    }
                  }
                },
                "props": {
                  "style": {
                    "fontFamily": "Roboto",
                    "fontSize": "18px"
                  },
                  "textStyle": {
                    "textAlign": "center"
                  }
                },
                "type": "ia.display.label"
              }
            ],
            "meta": {
              "name": "FlexContainer"
            },
            "position": {
              "shrink": 0
            },
            "props": {
              "direction": "column",
              "justify": "flex-end",
              "style": {
                "marginRight": "10px",
                "overflow": "hidden"
              }
            },
            "type": "ia.container.flex"
          }
        ],
        "meta": {
          "name": "varianceFlex_0"
        },
        "position": {
          "shrink": 0
        },
        "propConfig": {
          "position.display": {
            "binding": {
              "config": {
                "path": "view.params.timeLinetype"
              },
              "transforms": [
                {
                  "code": "\tif value \u003d\u003d \"production\":\n\t\treturn True\n\treturn False",
                  "type": "script"
                }
              ],
              "type": "property"
            }
          }
        },
        "type": "ia.container.flex"
      },
      {
        "children": [
          {
            "children": [
              {
                "meta": {
                  "name": "background"
                },
                "position": {
                  "height": 0.4,
                  "width": 1,
                  "y": 0.6
                },
                "props": {
                  "style": {
                    "classes": "SepasoftColors/LinearGradientToRight/Color004A98To4C9C2E"
                  }
                },
                "type": "ia.container.coord"
              },
              {
                "meta": {
                  "name": "varianceBar"
                },
                "position": {
                  "height": 0.4,
                  "x": 0.09999999999999998,
                  "y": 0.6
                },
                "propConfig": {
                  "meta.visible": {
                    "binding": {
                      "config": {
                        "path": "view.params.timeLinetype"
                      },
                      "transforms": [
                        {
                          "code": "\tif value \u003d\u003d \"production\" or value \u003d\u003d \"next\":\n\t\t\treturn True\n\treturn False",
                          "type": "script"
                        }
                      ],
                      "type": "property"
                    }
                  },
                  "position.width": {
                    "binding": {
                      "config": {
                        "struct": {
                          "now": "{view.custom.percentage}",
                          "variancePercentage": "{view.params.variancePercentage}"
                        },
                        "waitOnAll": true
                      },
                      "transforms": [
                        {
                          "code": "\t\n\tif value[\"now\"] \u003c\u003d 0:\n\t\tself.getSibling(\"arrow\").meta.visible \u003d False\n\t\tself.meta.visible \u003d False\n\telse:\n\t\tself.getSibling(\"arrow\").meta.visible \u003d True\n\t\tself.meta.visible \u003d True\n\t\n\tarrowPos \u003d value[\"now\"] - 0.05\n\t\n\tif arrowPos \u003e 0.93:\n\t\tarrowPos \u003d 0.93\n\telif arrowPos \u003c 0.07:\n\t\tarrowPos \u003d 0.07\n\tself.getSibling(\"arrow\").position.x \u003d arrowPos\n\t\n\tif self.view.params.timeLinetype \u003d\u003d \"next\":\n\t\tself.position.x \u003d 0\n\t\treturn arrowPos + 0.05\n\t\n\t\n\tif self.view.params.varianceCount \u003c 0:\n\t\tdif \u003d  value[\"now\"] - value[\"variancePercentage\"]\n\t\tself.position.x \u003d value[\"now\"] - dif\n\t\treturn dif\n\telse:\n\t\tself.position.x \u003d value[\"now\"]\n\t\t\n\t\tif value[\"variancePercentage\"] + value[\"now\"] \u003e 1:\n\t\t\tdif \u003d 1 - value[\"now\"]\n\t\t\n\t\treturn value[\"variancePercentage\"]\n\t\n\treturn value",
                          "type": "script"
                        }
                      ],
                      "type": "expr-struct"
                    }
                  },
                  "props.style.backgroundColor": {
                    "binding": {
                      "config": {
                        "path": "..../varianceFlex/Icon.props.color"
                      },
                      "type": "property"
                    }
                  }
                },
                "type": "ia.container.coord"
              },
              {
                "meta": {
                  "name": "arrow"
                },
                "position": {
                  "height": 0.6,
                  "width": 0.1,
                  "x": 0.93,
                  "y": 0.1
                },
                "props": {
                  "path": "material/arrow_drop_down"
                },
                "type": "ia.display.icon"
              }
            ],
            "meta": {
              "name": "lineOfTimline"
            },
            "position": {
              "basis": "100px",
              "grow": 1
            },
            "props": {
              "mode": "percent",
              "style": {
                "marginBottom": 0,
                "marginLeft": 10,
                "marginRight": 10,
                "marginTop": 0,
                "overflow": "hidden"
              }
            },
            "type": "ia.container.coord"
          }
        ],
        "meta": {
          "name": "TimeLine"
        },
        "position": {
          "basis": "50px",
          "shrink": 0
        },
        "props": {
          "style": {
            "overflow": "hidden"
          }
        },
        "type": "ia.container.flex"
      },
      {
        "children": [
          {
            "children": [
              {
                "meta": {
                  "name": "startLabel"
                },
                "position": {
                  "shrink": 0
                },
                "props": {
                  "style": {
                    "fontFamily": "Roboto",
                    "fontSize": "12px"
                  },
                  "text": "Start"
                },
                "type": "ia.display.label"
              },
              {
                "meta": {
                  "name": "dateLabel"
                },
                "position": {
                  "shrink": 0
                },
                "propConfig": {
                  "props.text": {
                    "binding": {
                      "config": {
                        "path": "view.params.Begin"
                      },
                      "transforms": [
                        {
                          "code": "\ttry:\n\t\treturn system.date.format(value, \"yyyy-MM-dd\")\n\texcept:\n\t\treturn \"\"",
                          "type": "script"
                        }
                      ],
                      "type": "property"
                    }
                  }
                },
                "props": {
                  "style": {
                    "fontFamily": "Roboto",
                    "fontSize": "12px"
                  }
                },
                "type": "ia.display.label"
              },
              {
                "meta": {
                  "name": "timeLabel"
                },
                "position": {
                  "shrink": 0
                },
                "propConfig": {
                  "props.text": {
                    "binding": {
                      "config": {
                        "path": "view.params.Begin"
                      },
                      "transforms": [
                        {
                          "code": "\ttry:\n\t\treturn system.date.format(value, \"hh:mm:ss a\")\n\texcept:\n\t\treturn \"\"",
                          "type": "script"
                        }
                      ],
                      "type": "property"
                    }
                  }
                },
                "props": {
                  "style": {
                    "fontFamily": "Roboto",
                    "fontSize": "12px"
                  }
                },
                "type": "ia.display.label"
              }
            ],
            "meta": {
              "name": "StartFlexLabel"
            },
            "position": {
              "shrink": 0
            },
            "props": {
              "alignItems": "center",
              "direction": "column",
              "style": {
                "marginLeft": "15px",
                "overflow": "visible"
              }
            },
            "type": "ia.container.flex"
          },
          {
            "meta": {
              "name": "spacing"
            },
            "position": {
              "grow": 1
            },
            "type": "ia.container.coord"
          },
          {
            "children": [
              {
                "meta": {
                  "name": "EndLabel"
                },
                "position": {
                  "shrink": 0
                },
                "props": {
                  "style": {
                    "fontFamily": "Roboto",
                    "fontSize": "12px"
                  },
                  "text": "End"
                },
                "type": "ia.display.label"
              },
              {
                "meta": {
                  "name": "dateLabel"
                },
                "position": {
                  "shrink": 0
                },
                "propConfig": {
                  "props.text": {
                    "binding": {
                      "config": {
                        "path": "view.params.End"
                      },
                      "transforms": [
                        {
                          "code": "\ttry:\n\t\treturn system.date.format(value, \"yyyy-MM-dd\")\n\texcept:\n\t\treturn \"\"",
                          "type": "script"
                        }
                      ],
                      "type": "property"
                    }
                  }
                },
                "props": {
                  "style": {
                    "fontFamily": "Roboto",
                    "fontSize": "12px"
                  }
                },
                "type": "ia.display.label"
              },
              {
                "meta": {
                  "name": "timeLabel"
                },
                "position": {
                  "shrink": 0
                },
                "propConfig": {
                  "props.text": {
                    "binding": {
                      "config": {
                        "path": "view.params.End"
                      },
                      "transforms": [
                        {
                          "code": "\ttry:\n\t\treturn system.date.format(value, \"hh:mm:ss a\")\n\texcept:\n\t\treturn \"\"",
                          "type": "script"
                        }
                      ],
                      "type": "property"
                    }
                  }
                },
                "props": {
                  "style": {
                    "fontFamily": "Roboto",
                    "fontSize": "12px"
                  }
                },
                "type": "ia.display.label"
              }
            ],
            "meta": {
              "name": "EndFlexLabel"
            },
            "position": {
              "shrink": 0
            },
            "props": {
              "alignItems": "center",
              "direction": "column",
              "style": {
                "marginRight": "15px",
                "overflow": "visible"
              }
            },
            "type": "ia.container.flex"
          }
        ],
        "meta": {
          "name": "beginEndText"
        },
        "position": {
          "basis": "50px",
          "shrink": 0
        },
        "props": {
          "style": {
            "marginTop": "10px",
            "overflow": "visible"
          }
        },
        "type": "ia.container.flex"
      },
      {
        "children": [
          {
            "meta": {
              "name": "rightSpacing"
            },
            "position": {
              "grow": 1
            },
            "type": "ia.container.coord"
          },
          {
            "meta": {
              "name": "Icon"
            },
            "position": {
              "basis": "30px",
              "shrink": 0
            },
            "propConfig": {
              "props.path": {
                "binding": {
                  "config": {
                    "path": "view.params.varianceCount"
                  },
                  "transforms": [
                    {
                      "code": "\tif value \u003d\u003d 0:\n\t\tself.parent.getChild(\"TextContainer\").getChild(\"unites\").position.display \u003d False\n\t\tself.props.color \u003d \"black\"\n\t\tself.getSibling(\"TextContainer\").props.style.color \u003d \"black\"\n\t\tself.parent.parent.getChild(\"TimeLine\").getChild(\"lineOfTimline\").getChild(\"varianceBar\").props.style.backgroundColor \u003d \"black\"\n\t\tself.parent.getChild(\"TextContainer\").getChild(\"status\").props.text \u003d \"On Schedule\"\n\t\t\n\t\treturn \"material/arrow_right\"\n\telif value \u003e 0:\n\t\tself.parent.getChild(\"TextContainer\").getChild(\"unites\").position.display \u003d True\n\t\tself.props.color \u003d \"#244A16\"\n\t\tself.getSibling(\"TextContainer\").props.style.color \u003d \"#244A16\"\n\t\tself.parent.parent.getChild(\"TimeLine\").getChild(\"lineOfTimline\").getChild(\"varianceBar\").props.style.backgroundColor \u003d \"#244A16\"\n\n\t\tself.parent.getChild(\"TextContainer\").getChild(\"status\").props.text \u003d \"Ahead\"\n\n\t\treturn \"material/arrow_drop_up\"\n\n\tself.parent.getChild(\"TextContainer\").getChild(\"unites\").position.display \u003d True\n\tself.props.color \u003d \"#EC1C24\"\n\tself.getSibling(\"TextContainer\").props.style.color \u003d \"#EC1C24\"\n\tself.parent.parent.getChild(\"TimeLine\").getChild(\"lineOfTimline\").getChild(\"varianceBar\").props.style.backgroundColor \u003d \"#EC1C24\"\n\tself.parent.getChild(\"TextContainer\").getChild(\"status\").props.text \u003d \"Behind\"\n\n\treturn \"material/arrow_drop_down\"",
                      "type": "script"
                    }
                  ],
                  "type": "property"
                }
              }
            },
            "props": {
              "color": "#EC1C24"
            },
            "type": "ia.display.icon"
          },
          {
            "children": [
              {
                "meta": {
                  "name": "unites"
                },
                "position": {
                  "basis": "30px",
                  "grow": 1,
                  "shrink": 0
                },
                "propConfig": {
                  "props.text": {
                    "binding": {
                      "config": {
                        "path": "view.params.varianceCount"
                      },
                      "transforms": [
                        {
                          "code": "\tunits \u003d \"\"\n\n\tif value \u003e 0:\n\t\tunits \u003d \"+\"\n\t\n\tunits +\u003d \"{:,}\".format( int(value)) + \" Units\"\n\t\n\treturn units",
                          "type": "script"
                        }
                      ],
                      "type": "property"
                    }
                  }
                },
                "props": {
                  "style": {
                    "fontFamily": "Roboto",
                    "fontSize": "18px"
                  },
                  "textStyle": {
                    "textAlign": "center"
                  }
                },
                "type": "ia.display.label"
              },
              {
                "meta": {
                  "name": "status"
                },
                "position": {
                  "basis": "20px",
                  "display": false,
                  "grow": 1,
                  "shrink": 0
                },
                "props": {
                  "style": {
                    "fontFamily": "Roboto",
                    "fontSize": "15px"
                  },
                  "text": "Behind",
                  "textStyle": {
                    "textAlign": "center"
                  }
                },
                "type": "ia.display.label"
              }
            ],
            "meta": {
              "name": "TextContainer"
            },
            "position": {
              "shrink": 0
            },
            "props": {
              "direction": "column",
              "justify": "center",
              "style": {
                "color": "#EC1C24",
                "fontFamily": "Roboto",
                "fontSize": "20px"
              }
            },
            "type": "ia.container.flex"
          },
          {
            "meta": {
              "name": "leftSpacing"
            },
            "position": {
              "grow": 1
            },
            "type": "ia.container.coord"
          }
        ],
        "meta": {
          "name": "varianceFlex"
        },
        "position": {
          "shrink": 0
        },
        "propConfig": {
          "position.display": {
            "binding": {
              "config": {
                "path": "view.params.timeLinetype"
              },
              "transforms": [
                {
                  "code": "\tif value \u003d\u003d \"production\":\n\t\treturn True\n\treturn False",
                  "type": "script"
                }
              ],
              "type": "property"
            }
          }
        },
        "props": {
          "justify": "center",
          "style": {
            "marginBottom": 10
          }
        },
        "type": "ia.container.flex"
      },
      {
        "children": [
          {
            "meta": {
              "name": "rightSpacing"
            },
            "position": {
              "grow": 1
            },
            "type": "ia.container.coord"
          },
          {
            "meta": {
              "name": "Icon"
            },
            "position": {
              "basis": "30px",
              "shrink": 0
            },
            "propConfig": {
              "props.path": {
                "binding": {
                  "config": {
                    "path": "view.params.varianceCount"
                  },
                  "transforms": [
                    {
                      "code": "\tif value \u003d\u003d 0:\n\t\tself.parent.getChild(\"TextContainer\").getChild(\"unites\").position.display \u003d False\n\t\tself.props.color \u003d \"black\"\n\t\tself.getSibling(\"TextContainer\").props.style.color \u003d \"black\"\n\t\tself.parent.parent.getChild(\"TimeLine\").getChild(\"lineOfTimline\").getChild(\"varianceBar\").props.style.backgroundColor \u003d \"black\"\n\t\tself.parent.getChild(\"TextContainer\").getChild(\"status\").props.text \u003d \"On Schedule\"\n\t\t\n\t\treturn \"material/arrow_right\"\n\telif value \u003e 0:\n\t\tself.parent.getChild(\"TextContainer\").getChild(\"unites\").position.display \u003d True\n\t\tself.props.color \u003d \"#244A16\"\n\t\tself.getSibling(\"TextContainer\").props.style.color \u003d \"#244A16\"\n\t\tself.parent.parent.getChild(\"TimeLine\").getChild(\"lineOfTimline\").getChild(\"varianceBar\").props.style.backgroundColor \u003d \"#244A16\"\n\n\t\tself.parent.getChild(\"TextContainer\").getChild(\"status\").props.text \u003d \"Ahead\"\n\n\t\treturn \"material/arrow_drop_up\"\n\n\tself.parent.getChild(\"TextContainer\").getChild(\"unites\").position.display \u003d True\n\tself.props.color \u003d \"#EC1C24\"\n\tself.getSibling(\"TextContainer\").props.style.color \u003d \"#EC1C24\"\n\tself.parent.parent.getChild(\"TimeLine\").getChild(\"lineOfTimline\").getChild(\"varianceBar\").props.style.backgroundColor \u003d \"#EC1C24\"\n\tself.parent.getChild(\"TextContainer\").getChild(\"status\").props.text \u003d \"Behind\"\n\n\treturn \"material/arrow_drop_down\"",
                      "type": "script"
                    }
                  ],
                  "type": "property"
                }
              }
            },
            "props": {
              "color": "#EC1C24"
            },
            "type": "ia.display.icon"
          },
          {
            "children": [
              {
                "meta": {
                  "name": "unites"
                },
                "position": {
                  "basis": "20px",
                  "shrink": 0
                },
                "props": {
                  "style": {
                    "fontFamily": "Roboto",
                    "fontSize": "12px"
                  },
                  "text": "-29,556,196 Minutes",
                  "textStyle": {
                    "textAlign": "center"
                  }
                },
                "type": "ia.display.label"
              },
              {
                "meta": {
                  "name": "status"
                },
                "position": {
                  "basis": "20px",
                  "shrink": 0
                },
                "props": {
                  "style": {
                    "fontFamily": "Roboto",
                    "fontSize": "12px"
                  },
                  "text": "Behind",
                  "textStyle": {
                    "textAlign": "center"
                  }
                },
                "type": "ia.display.label"
              }
            ],
            "meta": {
              "name": "TextContainer"
            },
            "position": {
              "shrink": 0
            },
            "props": {
              "direction": "column",
              "justify": "center",
              "style": {
                "color": "#EC1C24",
                "fontFamily": "Roboto",
                "fontSize": "12px"
              }
            },
            "type": "ia.container.flex"
          },
          {
            "meta": {
              "name": "leftSpacing"
            },
            "position": {
              "grow": 1
            },
            "type": "ia.container.coord"
          }
        ],
        "meta": {
          "name": "timeFlex"
        },
        "position": {
          "shrink": 0
        },
        "propConfig": {
          "position.display": {
            "binding": {
              "config": {
                "struct": {
                  "now": "{view.custom.percentage}",
                  "type": "{view.params.timeLinetype}"
                },
                "waitOnAll": true
              },
              "transforms": [
                {
                  "code": "\tif value[\"now\"] \u003e 0 and value[\"type\"] \u003d\u003d \"next\":\n\t\treturn True\n\n\treturn False",
                  "type": "script"
                }
              ],
              "type": "expr-struct"
            }
          }
        },
        "props": {
          "justify": "center",
          "style": {
            "marginBottom": 10
          }
        },
        "type": "ia.container.flex"
      }
    ],
    "meta": {
      "name": "root"
    },
    "position": {
      "display": true
    },
    "props": {
      "direction": "column"
    },
    "type": "ia.container.flex"
  }
}