Skip to content

MixedSignalGraph

Analog traces and digital lines on a shared time axis (CHART-103). Same traits and messages as DigitalWaveformGraph, plus the analog part.

MixedSignalGraph, light theme MixedSignalGraph, dark theme

Graphs, time · Widget catalog · API reference · schema mixedgraph.schema.json

Example

The traits of the picture above:

ai.MixedSignalGraph(
    label="MixedSignalGraph",
    lines=["TRIG"],
    dt=0.01,
    traces=[{"name": "analog"}],
    analog_fraction=0.6,
    annotations=[{"x": 0.5, "y": 0.9, "text": "threshold", "color": ""}],
    x_unit="s",
    size=(420, 200),
)

The data of the picture (samples, history or drawing) is sent with the widget's methods, not as traits: see the widget catalog.

Traits

Trait Type Default Set by Description
size array [520,320] host [width, height] in CSS pixels.
value object {} host Size of the data {n_samples, n_lines}, written by the host with each data message.
lines array of string [] host Line names; a missing name is shown as D. Python names the lines D0, D1, ... when their number changes.
buses array of object [] host Groups of lines {name, lines} shown as one hexadecimal value (first listed line = MSB). Python rejects buses naming a missing line; the front end ignores such lines.
dt number 1 host Sample interval in x-axis units; 0 is shown as 1.
x0 number 0 host x-axis position of the first sample.
show_lines_in_bus boolean true host Also draw the lines of each bus under it.
traces array of object [] host Optional style of each analog trace {name, color, width, visible}.
y_min number or null null host Analog y range; null (either limit): scaled to the data.
y_max number or null null host A number, or null when not set.
analog_fraction number 0.55 host Share of the height given to the analog traces.
Common traits (14), shared with other widgets
Trait Type Default Set by Description
mode "control", "indicator" "indicator" host "control": the user sets the value; "indicator": display only.
label string "" host Plain text, never interpreted as HTML (SEC-002).
disabled boolean false host Greyed out, input rejected.
visible boolean true host
tooltip string "" host Plain text shown on hover.
style "modern", "classic", "system" "modern" host
theme "auto", "light", "dark", "system" "auto" host "auto": the style decides; "system": the host page or the operating system (STYLE-007).
skin object {} host Replaceable drawing parts: part name -> SVG source, sanitized (STYLE-005, STYLE-006).
cursors array of object [] host, widget Cursors {x, name, color} (CHART-104). Dragged or typed by the operator, also on indicators; a host may complete a missing name as C (Python does).
cursor_values array of object [] host Readout of the cursors for the host program, {name, x, values}, computed by the host from its data. The front end draws its own readout and does not read this trait.
annotations array of object [] host Text annotations {x, y, text, color} in data coordinates (CHART-105).
export boolean true host Offer CSV, PNG and SVG downloads in the toolbar (CHART-107).
x_unit string "" host
unit string "" host

Set by: host, the program (Python, Julia, ...); widget, the user through the widget; derived, computed from other traits by the host that owns the state, or by the widget. See the trait contract.