{
  "type": "object",
  "properties": {
    "identifiers": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "height": {
      "type": [
        "string",
        "number"
      ]
    },
    "width": {
      "type": [
        "string",
        "number"
      ]
    },
    "showDateSelection": {
      "type": "boolean"
    },
    "hideRefresh": {
      "type": "boolean"
    },
    "loadConf": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "const": "Time",
              "type": "string"
            },
            "lead": {
              "type": "number"
            },
            "lag": {
              "type": "number"
            },
            "leadUnit": {
              "$ref": "#/definitions/DweenTimeUnit"
            },
            "lagUnit": {
              "$ref": "#/definitions/DweenTimeUnit"
            },
            "alignUnit": {
              "enum": [
                "DAYS",
                "HALFHOUR",
                "HOURS",
                "MILLIS",
                "MINUTES",
                "MONTHS",
                "SECONDS",
                "WEEKS",
                "YEARS"
              ],
              "type": "string"
            }
          },
          "required": [
            "alignUnit",
            "lag",
            "lagUnit",
            "leadUnit"
          ]
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "Product Entry"
            },
            "productTemplateId": {
              "type": "string"
            },
            "startAttribute": {
              "type": "string"
            },
            "endAttribute": {
              "type": [
                "null",
                "string"
              ]
            },
            "refName": {
              "type": "string"
            }
          },
          "required": [
            "endAttribute",
            "productTemplateId",
            "startAttribute",
            "type"
          ]
        }
      ]
    },
    "updateFrequency": {
      "type": "number"
    },
    "downsampleInterval": {
      "type": "number"
    },
    "bins": {
      "type": "object",
      "properties": {
        "start": {
          "type": "number"
        },
        "end": {
          "type": "number"
        },
        "size": {
          "type": "number"
        }
      }
    },
    "loading": {
      "type": "boolean"
    },
    "dynamicHeight": {
      "type": "boolean"
    },
    "legend": {},
    "xaxisName": {
      "type": "string"
    },
    "chartConf": {
      "$ref": "#/definitions/ILineChartConf"
    },
    "datasets": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/DatasetSpecification"
      }
    },
    "toggleTracesGrouping": {
      "type": "boolean"
    },
    "timeAxisStepSeconds": {
      "type": "number"
    },
    "chartDialogOpen": {
      "type": "boolean"
    },
    "selectedChartType": {
      "type": "string"
    },
    "dateFrom": {
      "$ref": "#/definitions/JSJoda.Instant"
    },
    "dateTo": {
      "$ref": "#/definitions/JSJoda.Instant"
    },
    "xAxisType": {
      "enum": [
        "array",
        "category",
        "date"
      ],
      "type": "string"
    },
    "setMinYAxis": {
      "type": "number"
    },
    "setMaxYAxis": {
      "type": "number"
    },
    "dateAndRefreshButtonsVisible": {
      "type": "boolean"
    },
    "productTemplateCreationDate": {
      "$ref": "#/definitions/JSJoda.Instant"
    },
    "currentYAxisRange": {
      "type": "object",
      "properties": {
        "min": {
          "type": "number"
        },
        "max": {
          "type": "number"
        }
      },
      "required": [
        "max",
        "min"
      ]
    },
    "annotations": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/Annotation"
      }
    },
    "hideHeader": {
      "type": "boolean"
    },
    "hideLegend": {
      "type": "boolean"
    },
    "showFilter": {
      "type": "boolean"
    },
    "defaultFilter": {
      "type": "string"
    },
    "optionalFilters": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/OptionalFilter"
      }
    },
    "filter": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "reportOptions": {
      "$ref": "#/definitions/ReportOptions"
    },
    "reportMode": {
      "type": "boolean"
    },
    "stateCb": {
      "type": "object"
    },
    "calendarType": {
      "const": "CALENDAR_445",
      "type": "string"
    },
    "from": {
      "type": "string"
    },
    "to": {
      "type": "string"
    },
    "referenceTime": {
      "type": "string"
    },
    "instantFrom": {
      "$ref": "#/definitions/JSJoda.Instant"
    },
    "instantTo": {
      "$ref": "#/definitions/JSJoda.Instant"
    },
    "instantReferenceTime": {
      "$ref": "#/definitions/JSJoda.Instant"
    }
  },
  "required": [
    "title"
  ],
  "definitions": {
    "DweenTimeUnit": {
      "enum": [
        "DAYS",
        "HALFHOUR",
        "HOURS",
        "MILLIS",
        "MINUTES",
        "MONTHS",
        "SECONDS",
        "WEEKS",
        "YEARS"
      ],
      "type": "string"
    },
    "ILineChartConf": {
      "type": "object",
      "properties": {
        "mode": {
          "enum": [
            "lines",
            "lines+markers",
            "text+lines+markers"
          ],
          "type": "string"
        },
        "marker": {
          "$ref": "#/definitions/IMarkerConfig"
        }
      },
      "required": [
        "marker",
        "mode"
      ]
    },
    "IMarkerConfig": {
      "type": "object",
      "properties": {
        "size": {
          "type": "number"
        }
      },
      "required": [
        "size"
      ]
    },
    "DatasetSpecification": {
      "type": "object",
      "properties": {
        "stringValueMapper": {
          "type": "number"
        },
        "overriddenTitle": {
          "type": "string"
        },
        "identifier": {
          "type": "string"
        },
        "line": {
          "$ref": "#/definitions/ILineConfig"
        },
        "range": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "color": {
          "type": "string"
        },
        "bgColor": {
          "type": "string"
        }
      },
      "required": [
        "identifier"
      ]
    },
    "ILineConfig": {
      "type": "object",
      "properties": {
        "backoff": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            {
              "type": "number"
            }
          ]
        },
        "color": {
          "type": "string"
        },
        "dash": {
          "type": "string"
        },
        "shape": {
          "type": "string"
        },
        "simplify": {
          "type": "boolean"
        },
        "smoothing": {
          "type": "number"
        },
        "width": {
          "type": [
            "null",
            "number"
          ]
        }
      }
    },
    "JSJoda.Instant": {
      "type": "object"
    },
    "Annotation": {
      "type": "object",
      "properties": {
        "date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "text": {
          "type": "string"
        },
        "dataset": {
          "type": [
            "null",
            "string"
          ]
        },
        "y": {
          "type": [
            "null",
            "number"
          ]
        }
      },
      "required": [
        "dataset",
        "date",
        "text",
        "y"
      ]
    },
    "OptionalFilter": {
      "type": "object",
      "properties": {
        "filter": {
          "type": "string"
        },
        "label": {
          "type": "string"
        }
      },
      "required": [
        "filter",
        "label"
      ]
    },
    "ReportOptions": {
      "type": "object",
      "properties": {
        "fontSize": {
          "type": "string"
        }
      }
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}