Configuration Timeline Widget

The widget’s configuration schema is defined in src/index.ts. Options and defaults:

  • Tango attributes:

    • Key: attributes

    • Type: INPUT_TANGO_ATTRIBUTES (repeatable { endpoint, attribute } rows)

    • Purpose: Define one or more attribute sources by selecting a Tango DB endpoint and entering the full attribute path.

    • Default: three TPM FPGA temperature attributes.

  • Use Live Data (subscribe):

    • Key: useLiveData

    • Type: boolean

    • Purpose: When true, subscribe to new values; when false, fetch periodically.

    • Default: false

  • Bar view:

    • Key: barView

    • Type: boolean

    • Purpose: If true, render attributes vs time using the Bar view renderer.

    • Default: false

  • Bar view width mode:

    • Key: barViewWidthMode

    • Type: 'timescale'|'equal'

    • Purpose: In Bar view, keep true time width (timescale) or give each stable value segment equal width (equal) and show true duration in hover labels.

    • Default: "timescale"

  • Bar view connect gaps:

    • Key: barViewConnectGaps

    • Type: boolean

    • Purpose: In Bar view, forward-fill values on an even time grid to keep cells connected; turn off to surface missing timestamps as holes.

    • Default: false

  • Bar view vertical gap (em):

    • Key: barViewVerticalGap

    • Type: number

    • Purpose: Adds vertical spacing in em between Bar view rows so adjacent attributes are visually separated.

    • Minimum: 0

    • Default: 0.0625

  • Legend position:

    • Key: legendPosition

    • Type: 'left'|'right'|'top'|'bottom'

    • Purpose: Line mode positions the trace legend. In Bar view mode, only left|right affect row-label side (top|bottom are ignored).

    • Default: "bottom"

  • Color map position:

    • Key: colorMapPosition

    • Type: 'left'|'right'|'top'|'bottom'|'none'

    • Purpose: Bar view color bar placement, or hide it entirely.

    • Default: "right"

  • Max points per trace:

    • Key: maxPoints

    • Type: integer

    • Default: 1000

  • Downsample:

    • Key: downsample

    • Type: 'minmax'|'avg'|'lttb'|'none'

    • Purpose: Server-side reduction for history windows.

    • Default: "minmax"

  • Enum display:

    • Key: enumDisplay

    • Type: 'value'|'label'

    • Purpose: For enum attributes, choose integer values or resolved enum labels in chart display/hover.

    • Behavior: The same enum-label mapping is applied to initial history and live subscription updates.

    • Default: "value"

  • Append interval (s):

    • Key: appendInterval

    • Type: integer

    • Purpose: 0 = every packet; N > 0 = throttle to every N seconds.

    • Default: 0

  • Show legend:

    • Key: showLegend

    • Type: boolean

    • Default: true

  • Legend font size (em):

    • Key: legendFontSizeEm

    • Type: number

    • Purpose: Legend font size in em.

    • Minimum: 0

    • Default: 0.5625

  • Marker shape:

    • Key: markerShape

    • Type: 'circle'|'diamond'|'square'|'cross'|'x'|'triangle-up'|'triangle-down'

    • Purpose: Marker symbol used when markers are rendered (displayMode includes scatter).

    • Default: "diamond"

  • Marker size (em):

    • Key: markerSizeEm

    • Type: number

    • Purpose: Marker size in em for line-view traces.

    • Behavior: 0 uses automatic sizing based on point density.

    • Minimum: 0

    • Default: 0

  • Line stroke (em):

    • Key: lineStrokeEm

    • Type: number

    • Purpose: Line thickness in em for line traces.

    • Behavior: 0 uses automatic defaults (0.125em for line-only modes, 0.0625em for mixed line+scatter modes at the default font size).

    • Minimum: 0

    • Default: 0

  • Display mode:

    • Key: displayMode

    • Type: 'line'|'line-step'|'scatter'|'line+scatter'|'line-step+scatter'

    • Purpose: Select straight-line, step-line, marker-only, or combined rendering for line-view traces.

    • Default: "line+scatter"

  • Custom margins:

    • Key: customMargins

    • Type: string

    • Example: "t:60,r:20,b:50,l:70"

  • Color scheme:

    • Key: colorScheme

    • Type: palette id exported by @ska-octopus-widget-sdk/widget-sdk (e.g., scientificActon10, tableau10)

    • Purpose: Drives both line/bar marker colors and bar view gradients using shared SDK palettes.

    • Behavior: Enum color mapping is shared across both modes, including live updates.

    • Default: the Acton scientific palette (scientificActon10)

  • Legend label format:

    • Key: legendFormat

    • Type: INPUT_FORMATTED preset legend

    • Purpose: Controls legend labels.

    • Supported values:

      • fullname: full attribute path.

      • lastname: last path segment.

      • initialname: first path segment (for example low-mccs/station/{STATION_ID}/state -> low-mccs).

      • number: extracted station/TPM numeric suffix when available.

      • split(n): return segment at index n from the attribute path (split(0) -> first segment, split(1) -> second, etc.).

    • Placeholder usage in custom templates is also supported (for example {station}/{number}, attr-{lastname}, {split(0)}).

    • Default: "lastname"

  • Plot title:

    • Key: plotTitle

    • Type: string

    • Default: ""

  • X axis label:

    • Key: xAxisLabel

    • Type: string (formatted input supported)

    • Purpose: Optional X-axis title text.

    • Default: ""

  • X axis unit:

    • Key: xAxisUnit

    • Type: string (formatted input supported)

    • Purpose: Appended to X-axis title in brackets.

    • Default: ""

  • Y axis label:

    • Key: yAxisLabel

    • Type: string (formatted input supported)

    • Purpose: Optional Y-axis title text.

    • Default: ""

  • Y axis unit:

    • Key: yAxisUnit

    • Type: string (formatted input supported)

    • Purpose: Appended to Y-axis title in brackets.

    • Default: ""

Compatibility notes:

  • Legacy saved configs with plain string attributes and global endpoint are still accepted.

  • Legacy showMarkers=false is mapped internally to line-only mode for backward compatibility.