Skip to content

Commit 5a7b592

Browse files
author
jie
committed
docs: refine thing model binding guide
1 parent 500d77f commit 5a7b592

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎docs/user-guide/tenant-operation-manual/device-mgt/device_template.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ The Web chart step is configured through the embedded ThingsVis preview and edit
5353

5454
Select a widget on the canvas, or switch to **Layers** and select the target widget by name. The selected widget's binding options are shown in the right property panel.
5555

56-
For a trend chart, select a line chart widget, such as `chart/uplot-line`. In **Content**, configure the chart title and display options. In **Data**, set the dataset binding mode to **Field**, set **Data Range** to **Device Data**, set **Data Type** to **Historical Data**, and select a historical array field such as `temperature__history` or `humidity__history`. Configure the time range, aggregation function, aggregation window, smooth curve, and area fill as needed.
56+
For a trend chart, select a line chart widget, such as `chart/uplot`. In **Content**, configure the chart title and display options. In **Data**, set the dataset binding mode to **Field**, set **Data Range** to **Device Data**, set **Data Type** to **Historical Data**, and select a historical array field such as `temperature__history` or `humidity__history`. Configure the time range, aggregation function, aggregation window, smooth curve, and area fill as needed.
5757

5858
![Trend Chart Data Binding](./images/image70.png)
5959

60-
For a value card, select `interaction/value-card-simple`. Set the card title, then set the value binding mode to **Field**. Use **Device Data** as the data range, **Thing Model Field** as the data type, and select a numeric field such as `humidity` or `temperature`. Configure the unit, whether to show the unit, the decimal places, and optional trend or icon display.
60+
For a value card, select `interaction/value-card`. Set the card title, then set the value binding mode to **Field**. Use **Device Data** as the data range, **Thing Model Field** as the data type, and select a numeric field such as `humidity` or `temperature`. Configure the unit, whether to show the unit, the decimal places, and optional trend or icon display.
6161

6262
![Value Card Data Binding](./images/image71.png)
6363

64-
For a switch, select `interaction/basic-switch`. Set **Switch Status** to **Field**, use **Device Data** as the data range, select **Thing Model Field**, and bind it to a Boolean field such as `switch`. Configure the label text, label position, on/off text, size, colors, and behavior options such as disabled state or confirmation before switching.
64+
For a switch, select `interaction/switch`. Set **Switch Status** to **Field**, use **Device Data** as the data range, select **Thing Model Field**, and bind it to a Boolean field such as `switch`. Configure the label text, label position, on/off text, size, colors, and behavior options such as disabled state or confirmation before switching.
6565

6666
![Switch Data Binding](./images/image72.png)
6767

‎i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/tenant-operation-manual/device-mgt/device_template.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ sidebar_position: 4
5353

5454
在画布中选中组件,或切换到 **图层** 后按组件名称选择目标组件。选中后,右侧属性面板会显示该组件的数据绑定项。
5555

56-
配置曲线图时,选择 `chart/uplot-line` 等折线图组件。在 **内容** 中设置标题、图例、X 轴、Y 轴等显示项;在 **数据** 中将数据集绑定模式设为 **字段**,数据范围选择 **设备数据**,数据类型选择 **历史数据**,字段选择 `temperature__history` 或 `humidity__history` 这类历史数组字段。随后按需要设置时间范围、聚合函数、聚合窗口、平滑曲线和面积填充。
56+
配置曲线图时,选择 `图表/时序图` 等折线图组件。在 **内容** 中设置标题、图例、X 轴、Y 轴等显示项;在 **数据** 中将数据集绑定模式设为 **字段**,数据范围选择 **设备数据**,数据类型选择 **历史数据**,字段选择 `temperature__history` 或 `humidity__history` 这类历史数组字段。随后按需要设置时间范围、聚合函数、聚合窗口、平滑曲线和面积填充。
5757

5858
![曲线图数据绑定](./images/image70.png)
5959

60-
配置数值卡片时,选择 `interaction/value-card-simple`。先设置卡片标题,再将 **数值** 的绑定模式设为 **字段**。数据范围选择 **设备数据**,数据类型选择 **物模型字段**,字段选择 `humidity` 或 `temperature` 等数值字段。根据物模型字段设置单位、是否显示单位、小数位数,也可以按需要开启趋势或图标。
60+
配置数值卡片时,选择 `指标/数值`。先设置卡片标题,再将 **数值** 的绑定模式设为 **字段**。数据范围选择 **设备数据**,数据类型选择 **物模型字段**,字段选择 `humidity` 或 `temperature` 等数值字段。根据物模型字段设置单位、是否显示单位、小数位数,也可以按需要开启趋势或图标。
6161

6262
![数值卡片数据绑定](./images/image71.png)
6363

64-
配置开关时,选择 `interaction/basic-switch`。将 **开关状态** 的绑定模式设为 **字段**,数据范围选择 **设备数据**,数据类型选择 **物模型字段**,字段绑定到 `switch` 这类布尔字段。然后配置标签文字、标签位置、开启文字、关闭文字、尺寸、颜色,以及禁用、确认后切换等行为选项。
64+
配置开关时,选择 `控制/开关`。将 **开关状态** 的绑定模式设为 **字段**,数据范围选择 **设备数据**,数据类型选择 **物模型字段**,字段绑定到 `switch` 这类布尔字段。然后配置标签文字、标签位置、开启文字、关闭文字、尺寸、颜色,以及禁用、确认后切换等行为选项。
6565

6666
![开关数据绑定](./images/image72.png)
6767

-58.8 KB
Loading
-61.2 KB
Loading

0 commit comments

Comments
 (0)