---
title: Single Data Widget
description: "**Purpose:** The `SingleData` widget is the most fundamental widget type. It is designed to display a single, real-time value from a datasource, making it ideal for monitoring specific metrics like temperature, pressure, or status indicators. Table Of Contents - [Anatomy](#anatomy) - [Configuration Settings](#configuration-settings)…"
url: "https://twinnoverse.com/docs/singledata-widget/"
updated: "2025-10-14"
category: Digital twin / Digital Twin Widget System / Digital Twin Widget Library Reference
---

# Single Data Widget

**Purpose:** The `SingleData` widget is the most fundamental widget type. It is designed to display a single, real-time value from a datasource, making it ideal for monitoring specific metrics like temperature, pressure, or status indicators.

    Table Of Contents

- [Anatomy](#anatomy)
- [Configuration Settings](#configuration-settings)
- [Data Schema](#data-schema)
- [Alert Actions](#alert-actions)
- [Use Cases](#use-cases)

---

## Anatomy

When viewed in a scene, the widget has a simple and clear layout:

- **Title:** The name of the data point being displayed (e.g., "Boiler Pressure").
- **Value:** The live data value fetched from the datasource. This value is animated smoothly when it updates.
- **Expand Button:** If a "Large View" is configured for this widget type, this button will appear, allowing the user to open a more detailed modal view.

---

## Configuration Settings

When adding a `SingleData` widget in the Scene Editor, you will be presented with the following settings.

| Group | Setting | UI Control | Description |
| --- | --- | --- | --- |
| **General** | **Title** | Text Input | Sets the display name shown at the top of the widget. |
| **Alerts** | **Enable Alerts** | Toggle | Turns on the alert functionality for this widget. |
|  | **Condition** | Dropdown | The logical operator to check the data against. Options are `greater_than`, `less_than`, `equal_to`. |
|  | **Value** | Text Input | The threshold value to trigger the alert. For example, if the condition is `greater_than` and the value is `100`, the alert will trigger for any data point over 100. |
|  | **Change Material** | Toggle | If enabled, the alert will also trigger the `ChangeMaterialColor` action, which can affect the 3D model this widget is attached to. |
| **Floating Icon** | **Show Icon** | Toggle | If enabled, an icon will appear in the scene when an alert is active for this widget. |
|  | **Icon Type** | Dropdown | Selects the visual style of the floating icon from a predefined list (e.g., Warning, Error, Info). |

---

## Data Schema

The `SingleData` widget expects the `payload` from the datasource to be a JSON object containing a key-value pair where the key matches the widget's configured **DataKey**.

**Example:** If the widget's `DataKey` is `"temperature"`, it will look for a payload like this:

```
{
  "temperature": 42.5
}
```

---

## Alert Actions

This widget has built-in visual feedback for alerts.

- **`ChangeWidgetColor`:** When an alert is active, the color of the **Value** text will change to red to draw immediate attention.
- **`ChangeMaterialColor`:** If enabled in the settings, this widget can also trigger an action to change the color of the parent 3D asset.

---

## Use Cases

- Displaying the current temperature from a sensor.
- Showing the RPM of a running engine.
- Monitoring the online/offline status of a machine.
- Showing a pressure reading from a pipe.
