Widget Functionality

What it does

Visualizes recent values for a set of Tango attributes either as line traces or as Bar view. It can subscribe to live updates or periodically fetch windows of HDB++ history.

Expected data

  • attributes: fully-qualified attribute names.

GraphQL operations

  • Live stream (subscription):

    • subscription tangoAttributes(fullNames: [String!]!) { device attribute value timestamp }

  • History snapshots (query): see src/graphql/operations.ts for the exact query returning historical ranges with optional downsampling.

Notes:

  • When barView = true (Bar view), Y = attributes, X = time, color = value.

  • barViewConnectGaps can forward-fill onto an even grid to keep the Bar view continuous, or leave holes to highlight missing timestamps.

  • barViewVerticalGap adds vertical spacing in em between Bar view rows to avoid visually merged adjacent states.

  • appendInterval throttles UI updates; backend streams are still consumed.

  • enumDisplay is respected consistently for both history and live data:

    • value: show integer values (no forced enum label fallback on state attributes).

    • label: show resolved enum labels in tooltips and enum axis ticks/colorbar labels.

  • Enum values use a shared mapping pipeline for history and live updates.

  • Enum color mapping is shared across Bar view and line mode marker rendering.

  • displayMode controls line-view trace rendering: line, line-step, scatter, line+scatter, or line-step+scatter.

  • legendFontSizeEm controls the Plotly legend text size in em.

  • markerShape controls point symbols whenever markers are shown.

  • markerSizeEm controls marker size in em (0 = automatic sizing).

  • lineStrokeEm controls line thickness in em (0 = automatic defaults).

  • Backend response notices are not rendered inside this widget; notice cards are emitted/handled by ska-octopus-frontend per widget instance.