Configuration Graph Widget

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

  • Tango attributes:

    • Key: attributes

    • Type: Array<{ endpoint: TANGO_DB, attribute: string }>

    • Purpose: Fully-qualified attribute names to plot, with an optional Tango DB per attribute.

    • Default: [{"endpoint":"","attribute":"low-mccs/spsstation/s8-1/yPolBandpass"}]

  • Plot title:

    • Key: plotTitle

    • Type: string

    • Default: ""

  • X axis label:

    • Key: xAxisLabel

    • Type: string

    • Default: "X"

  • X axis unit:

    • Key: xAxisUnit

    • Type: string

    • Default: ""

    • Purpose: Appended to the X axis label in brackets ([unit]).

  • Y axis label:

    • Key: yAxisLabel

    • Type: string

    • Default: "Value"

  • Y axis unit:

    • Key: yAxisUnit

    • Type: string

    • Default: ""

    • Purpose: Appended to the Y axis label in brackets ([unit]).

  • Values-axis query unit behavior:

    • If an axis unit is configured (xAxisUnit or yAxisUnit), that configured value is used.

    • Otherwise, query unit applies to whichever axis is configured as valueAxis.

    • valueAxis: 'y' uses query unit on Y; valueAxis: 'x' uses query unit on X.

    • Hover tooltips include a unit-source line per axis (Configured input or Device) when a unit is shown.

  • Values axis:

    • Key: valueAxis

    • Type: 'y' | 'x'

    • Default: 'y'

    • Purpose: Maps query array values to the selected axis. If set to 'x', Y defaults to the point index.

  • Show legend:

    • Key: showLegend

    • Type: boolean

    • Default: true

  • Custom margins:

    • Key: customMargins

    • Type: string

    • Default: ""

    • Purpose: Override Plotly margins with t, r, b, l (and optional pad), e.g. t:60,r:20,b:50,l:70.

  • Legend position:

    • Key: legendPosition

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

    • Default: "right"

  • Legend label format:

    • Key: legendFormat

    • Type: INPUT_FORMATTED preset legend

    • Default: "fullname"

    • Purpose: Controls legend labels using shared formatter options, including split(n) and placeholder templates such as {station}/{number}.

  • Color scheme:

    • Key: colorScheme

    • Type: any palette id exported by COLOR_PALETTES in @ska-octopus-widget-sdk/widget-sdk (currently tableau10, scientificActon10, scientificLisbon10).

    • Default: "tableau10"

  • Color assignment mode:

    • Key: colorAssignmentMode

    • Type: 'max' | 'min' | 'index'

    • Purpose: 'max' assigns palette index 0 to the highest-value series, 'min' to the lowest, and 'index' keeps colors mapped by trace order.

    • Default: 'max'

  • Nominal range minimum / maximum:

    • Keys: thresholdMin, thresholdMax

    • Type: number (optional)

    • Purpose: Define a nominal operating range. Points inside the range are muted to a faded grey while points outside keep their full series colour, so out-of-range values stand out at a glance.

    • Behaviour: The feature activates automatically as soon as a minimum and/or maximum is set (set just one for an open-ended range); leave both blank to disable. While a range is active the widget renders markers automatically — even in line display mode — because the per-point emphasis is carried by markers.

    • Default: unset (disabled).

  • Nominal fade opacity:

    • Key: thresholdFadeOpacity

    • Type: number (0–1)

    • Purpose: Opacity applied to in-range (grey) points and the connecting line. Lower values fade nominal points further so outliers dominate.

    • Default: 0.18