Skip to content

Views

The views block may hold one or more view blocks (note: singular), describing the different layout groups (views), from which the user may choose to view the experiment data.

At least one view block is required!

<phyphox version="...">
    ...
    <views>
        <view label="Pendulum">
            <value label="Frequency" unit="Hz">
                <input>frequencyBuffer</input>
            </value>
            <edit label="Length" unit="cm" factor="100" signed="false" default="50">
                <output>lengthBuffer</output>
            </edit>
            <info label="Example with user-input" />
        </view>
        <view label="Raw data">
            <graph label="Sensor data x" labelX="Time (s)" labelY="Amplitude">
                <input axis="x">timeBuffer</input>
                <input axis="y">sensorBuffer</input>
            </graph>
        </view>
    </views>
    ...
</phyphox>

Block: view

Each view-block groups display elements to present data to the user. The view block has a single attribute label displayed to the user to identify this view when the user switches views. The label should be short and concise.

<view label="STRING">
    <info />
    <separator />
    <value>...</value>
    <graph>...</graph>
    <edit>...</edit>
    <button>...</button>
    <toggle>...</toggle>
    <slider>...</slider>
    <dropdown>...</dropdown>
    <image />
    <camera-gui />
    <depth-gui />
</view>

Attributes

label
The name identifying this view. Will be translated if a matching translation string is defined.
optional, translatable

Common attributes

Every view element accepts two attributes beyond the ones listed in its own section:

Attributes accepted by every view element

label
The caption of the element, shown alongside it - next to a value or edit field, on a button, above a graph. It is translatable via the translations block. Two exceptions: the info element has no separate caption - there, label is the displayed text itself (see info) - and separator and image display no label at all; both parsers accept the attribute there like everywhere, but it has no effect.
optional, translatable
visibility
Points to a data container that decides whether this element is shown. If the container is empty or its last value is NaN, zero or negative, the element is hidden; if the last value is greater than zero, it is visible. The element observes the container, so the state can change while the experiment runs - analysis results or user inputs like a toggle can show and hide elements dynamically.
added in 1.20 optional

View elements

The view elements are documented by category: