{
  "type": "object",
  "properties": {
    "valueDataset": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "subtitle": {
      "type": "string"
    },
    "chartType": {
      "enum": ["bar", "line"],
      "type": "string"
    },
    "aggregationType": {
      "enum": ["AVG", "COUNT", "MAX", "MIN", "SUM"],
      "type": "string"
    },
    "loadConf": {
      "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"]
    },
    "comparisonPeriod": {
      "type": "string"
    },
    "groupingMode": {
      "$ref": "#/definitions/GroupingMode"
    },
    "dateRangeSelectType": {
      "type": "string"
    },
    "updateFrequency": {
      "type": "number"
    },
    "dateFrom": {
      "type": "string"
    },
    "dateTo": {
      "type": "string"
    },
    "width": {
      "type": "number"
    },
    "height": {
      "type": "number"
    },
    "useDataUpToLastFinishedMonth": {
      "type": "boolean"
    },
    "useDataUpToLastFinishedWeek": {
      "type": "boolean"
    },
    "hideFutureValues": {
      "type": "boolean"
    },
    "hideLegend": {
      "type": "boolean"
    },
    "weeksRangeStartOffset": {
      "type": "number"
    },
    "weeksRangeEndOffset": {
      "type": "number"
    },
    "chartMargin": {
      "type": "object",
      "properties": {
        "t": {
          "type": "number"
        },
        "b": {
          "type": "number"
        },
        "l": {
          "type": "number"
        },
        "r": {
          "type": "number"
        }
      }
    },
    "id": {
      "type": "string"
    },
    "reportOptions": {
      "$ref": "#/definitions/ReportOptions"
    },
    "reportMode": {
      "type": "boolean"
    },
    "stateCb": {
      "type": "object"
    },
    "calendarType": {
      "const": "CALENDAR_445",
      "type": "string"
    },
    "hideHeader": {
      "type": "boolean"
    },
    "theme": {
      "enum": ["dark", "light", "transparent"],
      "type": "string"
    }
  },
  "required": [
    "comparisonPeriod",
    "dateRangeSelectType",
    "groupingMode",
    "loadConf",
    "valueDataset"
  ],
  "definitions": {
    "DweenTimeUnit": {
      "enum": [
        "DAYS",
        "HALFHOUR",
        "HOURS",
        "MILLIS",
        "MINUTES",
        "MONTHS",
        "SECONDS",
        "WEEKS",
        "YEARS"
      ],
      "type": "string"
    },
    "GroupingMode": {
      "enum": ["CONTINUOUS", "YEARLY"],
      "type": "string"
    },
    "ReportOptions": {
      "type": "object",
      "properties": {
        "fontSize": {
          "type": "string"
        }
      }
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}
