Documentation
¶
Overview ¶
Package uichart contains the uiChart dashboard widget: a live line/bar chart of a numeric series. A scalar payload pushes {"value": n} (the client appends it to the rolling series); an array payload pushes {"values": [...]} (series replace).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UIChartConfig ¶
type UIChartConfig struct {
// Kind is "line" (default) or "bar".
Kind string `json:"kind"`
// Points caps the client-side rolling series length (0 → 50).
Points int `json:"points"`
}
UIChartConfig holds the uiChart node configuration; it is also the manifest Config the client renderer consumes.
type UIChartNode ¶
type UIChartNode struct {
*nodebase.UIWidgetNode
// contains filtered or unexported fields
}
UIChartNode pushes chart state to the dashboard sink.
func NewUIChartNode ¶
func NewUIChartNode(node nodestore.NodeInterface, host nodebase.NodeHost, cfg *UIChartConfig) *UIChartNode
NewUIChartNode creates a new uiChart widget node.
func (*UIChartNode) Execute ¶
func (n *UIChartNode) Execute(ctx context.Context, in nodestore.MessageInterface) (nodestore.MessageInterface, error)
Execute pushes {"value": n} for a scalar payload (the client appends it to the rolling series) or {"values": [...]} for an array payload (series replace). Non-numeric payloads push nothing.