Skip to content

Commit d3f684c

Browse files
authored
Merge pull request #217390 from baanders/11-7-ux
ADT: 3D scenes, visual rules + data history widget
2 parents d72f990 + 158de35 commit d3f684c

30 files changed

+43
-36
lines changed

articles/digital-twins/concepts-3d-scenes-studio.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ titleSuffix: Azure Digital Twins
55
description: Learn about 3D Scenes Studio (preview) for Azure Digital Twins.
66
author: baanders
77
ms.author: baanders # Microsoft employees only
8-
ms.date: 11/02/2022
8+
ms.date: 11/07/2022
99
ms.topic: conceptual
1010
ms.service: digital-twins
1111
ms.custom: event-tier1-build-2022
@@ -94,9 +94,8 @@ When creating a behavior for an element, you'll define the following components:
9494

9595
* **Elements**: Behaviors describe the visuals that are applied to each [element](#elements) in the visualization. You can choose which elements this behavior applies to.
9696
* **Twins**: Identify the set of twins whose data is available to this behavior. This includes the targeted elements' primary twins, and any other twins.
97-
* **Status**: States are data-driven overlays on your elements to indicate the health or status of the element.
98-
* **Alerts**: Alerts are conditional notifications to help you quickly see when an element requires attention.
99-
* **Widgets**: Widgets are data-driven visuals that provide additional data to help you diagnose and investigate the scenario that the behavior represents. Configuring widgets will help you make sure the right data is discoverable when an alert or status is active.
97+
* **Visual rules**: Visual rules are data-driven overlays on your elements that you can configure to indicate the health or status of the element.
98+
* **Widgets**: Widgets are data-driven visuals that provide additional data to help you diagnose and investigate the scenario that the behavior represents. Configuring widgets will help you make sure the right data is discoverable when a particular condition is active.
10099

101100
You can also create **layers** in your scene to help organize your behaviors. Layers act like tags on the behaviors, enabling you to define which behaviors need to be seen together, thus creating custom views of your scene for different roles or tasks.
102101

@@ -108,7 +107,7 @@ Here's what the viewer looks like:
108107

109108
:::image type="content" source="media/concepts-3d-scenes-studio/view-mode.png" alt-text="Screenshot of 3D Scenes Studio viewer." lightbox="media/concepts-3d-scenes-studio/view-mode.png":::
110109

111-
You can use the **Elements** list to explore all the elements and active alerts in your scene, or you can click elements directly in the visualization to explore their details.
110+
You can use the **Elements** list to explore all the elements and active conditions in your scene, or you can click elements directly in the visualization to explore their details.
112111

113112
## Embeddable viewer component
114113

articles/digital-twins/how-to-use-3d-scenes-studio.md

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ titleSuffix: Azure Digital Twins
55
description: Learn how to use all the features of 3D Scenes Studio (preview) for Azure Digital Twins.
66
author: baanders
77
ms.author: baanders # Microsoft employees only
8-
ms.date: 11/02/2022
8+
ms.date: 11/07/2022
99
ms.topic: how-to
1010
ms.service: digital-twins
1111
ms.custom: event-tier1-build-2022
@@ -205,7 +205,7 @@ If you started the behavior creation process from a specific element, that eleme
205205

206206
On the **Twins** tab, you can modify the set of twins whose data is available to this behavior. This includes the targeted elements' primary twins, and any additional twins.
207207

208-
You can add secondary digital twin data sources for an element. After configuring other twins, you'll be able to use properties from those twins in your behavior expressions for this element. You should only add other twins when there are additional twins with data beyond your primary twin that you want to leverage in your [status](#status), [alerts](#alerts), and [widgets](#widgets) for this behavior.
208+
You can add secondary digital twin data sources for an element. After configuring other twins, you'll be able to use properties from those twins in your behavior expressions for this element. You should only add other twins when there are additional twins with data beyond your primary twin that you want to leverage in your [visual rules](#visual-rules) and [widgets](#widgets) for this behavior.
209209

210210
To add a new twin data source, select **Add twin** and **Create twin**.
211211

@@ -218,35 +218,35 @@ This will open a **New twin** panel where you can name the additional twin and s
218218
>[!TIP]
219219
>[Azure Digital Twins Explorer](concepts-azure-digital-twins-explorer.md) can help you see twins that might be related to the primary twin for this element. You can query your graph using `SELECT * FROM digitaltwins WHERE $dtId="<primary-twin-id>`, and then use the [double-click expansion feature](how-to-use-azure-digital-twins-explorer.md#control-twin-graph-expansion) to explore related twins.
220220
221-
### Status
221+
### Visual rules
222222

223-
In the **Status** tab, you can define states for your element. *States* are data-driven overlays on your elements to indicate the health or status of the element.
223+
In the **Visual rules** tab, you can configure data-driven overlays on your elements to indicate their health or status in the viewer.
224224

225-
To create a state, first choose whether the state is dependent on a **Single property** or a **Custom (advanced)** property expression. For a **Single property**, you'll get a dropdown list of numeric properties on the primary twin. For **Custom (advanced)**, you'll get a text box where you can write a custom JavaScript expression using one or more properties. The expression should have a numeric outcome. For more information about writing custom expressions, see [Use custom (advanced) expressions](#use-custom-advanced-expressions).
225+
To create a rule, start by selecting **Add Rule**.
226226

227-
Once you've defined your property expression, set value ranges to create state boundaries, and choose colors to represent each state in the visualization. The min of each value range is inclusive, and the max is exclusive.
227+
:::image type="content" source="media/how-to-use-3d-scenes-studio/new-behavior-visual-rules.png" alt-text="Screenshot of the New behavior options in 3D Scenes Studio. The Visual Rules tab is highlighted." lightbox="media/how-to-use-3d-scenes-studio/new-behavior-visual-rules.png":::
228228

229-
:::image type="content" source="media/how-to-use-3d-scenes-studio/new-behavior-status.png" alt-text="Screenshot of the New behavior options in 3D Scenes Studio. The Status tab is highlighted." lightbox="media/how-to-use-3d-scenes-studio/new-behavior-status.png":::
229+
Choose a **Display name** for the rule.
230230

231-
### Alerts
231+
Next, choose whether the rule is dependent on a **Single property** or a **Custom (advanced)** property expression. For a **Single property**, you'll get a dropdown list of numeric properties on the primary twin. For **Custom (advanced)**, you'll get a text box where you can write a custom JavaScript expression using one or more properties. The expression should have a numeric outcome. For more information about writing custom expressions, see [Use custom (advanced) expressions](#use-custom-advanced-expressions).
232232

233-
In the **Alerts** tab, you can set conditional notifications to help you quickly see when an element requires your attention.
233+
Once you've defined your property expression, select **Add condition** to define the conditional visual effects.
234234

235-
First, enter a **Trigger expression**. This is a JavaScript expression involving one or more properties of *PrimaryTwin* that yields a boolean result. This expression will generate an alert badge in the visualization when it evaluates to true. For more information about writing custom expressions, see [Use custom (advanced) expressions](#use-custom-advanced-expressions).
235+
:::image type="content" source="media/how-to-use-3d-scenes-studio/new-behavior-visual-rules-2.png" alt-text="Screenshot of the New visual rule options in 3D Scenes Studio. The described fields are highlighted." lightbox="media/how-to-use-3d-scenes-studio/new-behavior-visual-rules-2.png":::
236236

237-
Then, customize your alert badge with an **Icon** and **Color**, and a string for **Scenario Description**.
237+
In the **Add condition** options, enter a **Label** for the condition in the visualization.
238238

239-
:::image type="content" source="media/how-to-use-3d-scenes-studio/new-behavior-alerts.png" alt-text="Screenshot of the New behavior options in 3D Scenes Studio. The Alerts tab is highlighted." lightbox="media/how-to-use-3d-scenes-studio/new-behavior-alerts.png":::
239+
Under **Conditions**, use the **Min** and **Max** fields to identify value boundaries for the condition. The min of each value range is inclusive, and the max is exclusive.
240240

241-
Notification text can also include calculation expressions with this syntax: `${<calculation-expression>}`. Expressions will be computed and displayed dynamically in the [viewer](#view-scenes-individually).
241+
Under **Actions**, define what happens in the scene visualization when the condition is met. You can use **Mesh coloring** to control the color of the property expression in the viewer, or **Badge** to display a badge of a certain color and icon when the condition for the property expression is met.
242242

243-
For an example of notification text with an expression, consider a behavior for a pasteurization tank, whose twin has double properties for `InFlow` and `OutFlow`. To display the difference between the tank's inflow and outflow in the notification, you could use this notification text: `Too much flow (InFlow is ${PrimaryTwin.InFlow - PrimaryTwin.OutFlow} greater than OutFlow)`. The computed result of the expression will be shown in the alert text in the viewer.
243+
:::image type="content" source="media/how-to-use-3d-scenes-studio/new-behavior-visual-rules-3.png" alt-text="Screenshot of the New visual rule options in 3D Scenes Studio. The Add condition options are highlighted." lightbox="media/how-to-use-3d-scenes-studio/new-behavior-visual-rules-3.png":::
244244

245-
:::image type="content" source="media/how-to-use-3d-scenes-studio/new-behavior-alerts-expression.png" alt-text="Screenshots showing the notification text being entered on the Alerts dialog, and how the alert appears in the Viewer." lightbox="media/how-to-use-3d-scenes-studio/new-behavior-alerts-expression.png":::
245+
When you're done, select **Save**.
246246

247247
### Widgets
248248

249-
Widgets are managed on the **Widgets** tab. *Widgets* are data-driven visuals that provide additional context and data, to help you understand the scenario that the behavior represents. Configuring widgets will help you make sure the right data is discoverable when an alert or status is active.
249+
Widgets are managed on the **Widgets** tab. *Widgets* are data-driven visuals that provide additional context and data, to help you understand the scenario that the behavior represents. Configuring widgets will help you make sure the right data is discoverable when a certain condition is active.
250250

251251
Select **Add widget** to bring up the **Widget library**, where you can select from different type of available widgets.
252252

@@ -284,15 +284,23 @@ Here are the types of widget that you can create:
284284

285285
:::image type="content" source="media/how-to-use-3d-scenes-studio/new-behavior-widgets-value-expression.png" alt-text="Screenshots showing the notification text being entered on the value widget dialog, and how the widget appears in the Viewer." lightbox="media/how-to-use-3d-scenes-studio/new-behavior-widgets-value-expression.png":::
286286

287+
* **Data history**: For displaying property values over time. This widget works with Azure Digital Twins' [data history feature](concepts-data-history.md), so it's only available if you've [enabled data history](how-to-use-data-history.md) for the instance being used in this 3D scene. Once a data history connection exists for the instance, you'll be able to display that data with this widget.
288+
289+
The widget will fill the **Connection string** field automatically, by targeting data in the Azure Data Explorer instance that's already connected to this Azure Digital Twins instance.
290+
291+
Enter a **Display name**, and add one or more **time series** datasets based on properties of the primary twin. You can also customize how the time series data appears in the widget chart.
292+
293+
:::image type="content" source="media/how-to-use-3d-scenes-studio/new-behavior-widgets-data-history.png" alt-text="Screenshot of creating a new data history widget in 3D Scenes Studio." lightbox="media/how-to-use-3d-scenes-studio/new-behavior-widgets-data-history.png":::
294+
287295
### Use custom (advanced) expressions
288296

289-
While defining [status](#status), [alerts](#alerts), and [widgets](#widgets) in your behaviors, you may want to use custom expressions to define a property condition.
297+
While defining [visual rules](#visual-rules) and [widgets](#widgets) in your behaviors, you may want to use custom expressions to define a property condition.
290298

291-
:::image type="content" source="media/how-to-use-3d-scenes-studio/new-behavior-status-custom.png" alt-text="Screenshot of defining a custom expression for a Status in 3D Scenes Studio." lightbox="media/how-to-use-3d-scenes-studio/new-behavior-status-custom.png":::
299+
:::image type="content" source="media/how-to-use-3d-scenes-studio/new-behavior-custom-property-expression.png" alt-text="Screenshot of defining a custom expression in 3D Scenes Studio." lightbox="media/how-to-use-3d-scenes-studio/new-behavior-custom-property-expression.png":::
292300

293-
These expressions use the JavaScript language, and allow you to use one or more properties of associated twins to define custom logic.
301+
These expressions use the JavaScript language, and allow you to use one or more properties of associated twins to define custom logic. The result of your expression must match the result type that you specify in the **Type** field.
294302

295-
The following chart indicates which JavaScript operators are supported in 3D Scenes Studio.
303+
The following chart indicates which JavaScript operators are supported in 3D Scenes Studio custom expressions.
296304

297305
| Operator type | Supported? |
298306
| --- | --- |
Binary file not shown.
68.7 KB
Loading
-1.72 KB
Loading
-2.05 KB
Loading
Binary file not shown.
-1.91 KB
Loading

0 commit comments

Comments
 (0)