/* eslint-disable */ /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * The main heading displayed above the chart. Use to describe what state history is being shown (e.g., 'Machine Operating States', 'Device Connectivity History'). */ export type Title = string; /** * Secondary text displayed below the title. Use for additional context like facility name, time period, or data source. */ export type Subtitle = string; /** * Label text displayed below the horizontal time axis. Typically 'Time', 'Date', or left empty. */ export type TimeAxisLabel = string; /** * When enabled, shows a slider control below the chart for zooming into specific time ranges. Leave this DISABLED (the default) unless the user explicitly asks for a zoom, pan, or time-range slider: the slider costs vertical chart space, and dashboards usually already control the visible time range through their data query or a filter widget. Do not enable it just because the history period is long. */ export type TimeAxisZoomTool = boolean; /** * When enabled, displays a legend showing the mapping between colors and state names. Essential for understanding the visualization. */ export type ShowLegend = boolean; /** * The exact state value as it appears in the data (e.g., 'RUNNING', 'STOPPED', 'IDLE', 'ERROR'). Must match the data values exactly for color mapping to work. */ export type StateName = string; /** * Array defining all possible states and their display colors. Each state that appears in the data should have a corresponding entry here for proper color coding. */ export type StateMap = { name?: StateName; color?: Color; [k: string]: unknown; }[]; /** * Display name for this data series group. Used in legends and tooltips to identify the data source. */ export type Label = string; /** * Groups data into separate timeline charts. Series with the same chartName share one chart; different names create separate charts. Use '#split#' to auto-create one chart per pivot value. */ export type ChartName = string; /** * Identifier for the entity (machine, device, asset) this event belongs to. Events with the same label form one timeline row. Different labels create separate rows. */ export type AssetLabel = string; /** * When this state change occurred. Use ISO 8601 format (e.g., '2023-11-04T22:47:52.351152+00:00') or Unix timestamps. Events should be in chronological order. */ export type EventTimestamp = string; /** * The new state that began at this timestamp. Must match a state name defined in the State Map for proper color coding. */ export type State = string; /** * Column value used to split data into multiple timeline rows automatically. Each unique pivot value creates a separate row (e.g., pivot by 'machine_id' to show one row per machine). */ export type SplitDataBy = string; /** * Array of state change events. Each event has a timestamp and new state. The chart draws bars from each event to the next, showing how long each state lasted. */ export type Data = { label?: AssetLabel; tsp?: EventTimestamp; state?: State; pivot?: SplitDataBy; [k: string]: unknown; }[]; /** * Array of data series containing state change events. Each series can represent a group of related assets or a category of state data. */ export type Dataseries = { label?: Label; chartName?: ChartName; data?: Data; [k: string]: unknown; }[]; /** * A state history timeline chart widget for visualizing discrete state changes over time. Use this widget to display how entities transition between states (e.g., machine operating states, device connectivity, task status). Each row represents an entity (asset/device) and shows colored horizontal bars indicating which state it was in at any point in time. States are mapped to colors for quick visual recognition. Supports multiple data series, pivot-based auto-generation from data columns, and zoom controls for time navigation. Ideal for production monitoring, equipment uptime tracking, process state analysis, or any scenario requiring visual representation of state durations and transitions. */ export interface StateHistoryConfiguration { title?: Title; subTitle?: Subtitle; axis?: AxisSettings; stateMap?: StateMap; dataseries?: Dataseries; [k: string]: unknown; } /** * Configuration for the time axis and legend display. */ export interface AxisSettings { xAxisLabel?: TimeAxisLabel; xAxisZoom?: TimeAxisZoomTool; showLegend?: ShowLegend; [k: string]: unknown; } /** * The color representing this state in the timeline. Use semantic colors: green for active/OK states, red for error/stopped, yellow for warning/idle, gray for unknown. */ export interface Color { [k: string]: unknown; }