{
  "allOf": [
    {
      "$ref": "#/definitions/DashboardComponentPropsBase<ReportOptions>"
    },
    {
      "$ref": "#/definitions/IComponentTheme"
    },
    {
      "description": "The COLORS-mode slice of the config. Split out so the colour editor and view can be handed just\nthis, with no loadConf/dataType in sight.\n\n`entries` is a snapshot, seeded from a chart by the editor's \"Sync from chart\" button — nothing\nis resolved at render time, so the legend renders identically in a dashboard, in a generated\nreport, and in the dween [jsComponent] loader, where sibling component configs are not reachable.",
      "type": "object",
      "properties": {
        "entries": {
          "type": "array",
          "items": {
            "description": "One row of the COLORS mode. `sourceValue` is what gives a row identity across re-syncs: it is the\nvalue of the chart shading mapping the row was seeded from. Rows the user typed in by hand have\nno `sourceValue` and are never rewritten by a sync.",
            "type": "object",
            "properties": {
              "label": {
                "type": "string"
              },
              "color": {
                "type": "string"
              },
              "opacity": {
                "type": "number"
              },
              "sourceValue": {
                "type": "number"
              },
              "orphaned": {
                "type": "boolean"
              }
            },
            "required": ["color", "label"]
          }
        },
        "orientation": {
          "enum": ["HORIZONTAL", "VERTICAL"],
          "type": "string"
        },
        "sourceComponentId": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "properties": {
        "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": [
                "CALENDAR_445",
                "DAYS",
                "HALFHOUR",
                "HOURS",
                "MILLIS",
                "MINUTES",
                "MONTHS",
                "SECONDS",
                "WEEKS",
                "YEARS"
              ],
              "type": "string"
            },
            "truncateStartUnit": {
              "description": "Snaps the *computed window start* down to this unit's boundary, after the lag has been\nsubtracted. Distinct from `alignUnit`, which truncates the reference time and so lands on the\nwindow's end: a 48-hour lag off an hour-aligned \"now\" starts mid-day, and `DAYS` here pulls it\nback to local midnight. Widens the window rather than shifting it. Default none/null.",
              "enum": [
                "DAYS",
                "HALFHOUR",
                "HOURS",
                "MILLIS",
                "MINUTES",
                "MONTHS",
                "SECONDS",
                "WEEKS",
                "YEARS"
              ],
              "type": "string"
            }
          },
          "required": ["alignUnit", "lag", "lagUnit", "leadUnit"]
        },
        "dataType": {
          "$ref": "#/definitions/DataType"
        },
        "datasets": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": ["dataType", "loadConf"]
    }
  ],
  "definitions": {
    "DashboardComponentPropsBase<ReportOptions>": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "reportOptions": {
          "$ref": "#/definitions/ReportOptions"
        },
        "reportMode": {
          "type": "boolean"
        },
        "stateCb": {
          "type": "object"
        },
        "calendarType": {
          "const": "CALENDAR_445",
          "type": "string"
        },
        "hideHeader": {
          "type": "boolean"
        }
      }
    },
    "ReportOptions": {
      "type": "object",
      "properties": {
        "fontSize": {
          "type": "string"
        }
      }
    },
    "IComponentTheme": {
      "type": "object",
      "properties": {
        "theme": {
          "enum": ["dark", "light", "transparent"],
          "type": "string"
        }
      }
    },
    "DweenTimeUnit": {
      "enum": [
        "DAYS",
        "HALFHOUR",
        "HOURS",
        "MILLIS",
        "MINUTES",
        "MONTHS",
        "SECONDS",
        "WEEKS",
        "YEARS"
      ],
      "type": "string"
    },
    "DataType": {
      "enum": ["COLORS", "DATASETS", "HISTORICAL", "MONTHS", "YEARS"],
      "type": "string"
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}
