Overview
This document applies to users who have installed the FineVis Data Visualization plugin to learn plugin functions.
Version
FineReport Version | Plugin Version | Functional Change |
---|---|---|
11.5.1 | V4.1.0 | Added WebSocket to the drop-down list of Data Source. Added the Set Refresh Frequency function under Data Source > Dataset. |
Function Description
3D component data sources can be divided into Dataset data and WebSocket data:
1. Dataset: allows you to select a local dataset or a server dataset.
2. Websocket: allows you to achieve real-time data access by configuring the URL.
Dataset
When you set Data Source to Dataset, you can choose a local dataset or a server dataset configured in the system.
The plugin of V4.1.0 allows you to set a refresh frequency for the data refresh within the component.
WebSocket

Accessing data through Websocket can meet the high-frequency refresh and real-time update requirements of labels during model data display through data layers, enhancing data response efficiency and user experience, thereby better supporting key business scenarios such as real-time monitoring and dynamic visualization.
Data Layer, Real-time Model Motion, Parameter Model Update, and Model Data Application of a 3D custom component all support WebSocket configuration.

Data Format Requirement
Incremental Data
The WebSocket data source configured in Data Layer Setting and Parameter Model Update is incremental data, which must be explicitly tagged as added, updated, or deleted data.
The data format requirement is as follows: { ID: websocket configuration ID; data: { opType: "upsert"/ "delete", other data key-value }[]; }[]

1. The data needs to be converted into the JSON string.
2. When the input data is in a non-array format, an error will be reported , saying "Data format error, array type is required, but the current input data is of non-array type."
The following table describes the data format in detail.
Field | Description |
---|---|
ID | Unique string used to identify the target data group |
Data | Array where each element represents an operation, containing the operation type (opType) and associated fields opType field:
|
Full Data
The WebSocket data source configured in Data Layer Setting - Initialization, Real-time Model Motion Setting, and Model Data Application is full data.
The data format is as follows: { ID: websocket configured ID; data: { data key-value; }[]; }[]

Abnormal Scene
Scenario | Error Message |
---|---|
The input data is in the non-array format. | The data format is incorrect. The data needs to be of the array type, but the data currently transferred is not of the array type. |
The ID is missing for a certain item of the input data. | The data format is incorrect. The ID is not transferred. |
The data is missing for a certain item of the input data. | The data format of the ID is incorrect. The data is not transferred. |
A certain part of the input data is in the non-array format. | The data format of the ID is incorrect. The data needs to be of the array type, but the data currently transferred is not of the array type. |
A field is missing for the input data. The opType field is missing in incremental data. | Since the data format of the layer name is incorrect, the current data is skipped. (Expected data format: {corresponding to the configured key}; Actual data format: {corresponding to the configured key})
|
WebSocket configuration timeout (60s) during data layer initialization appears. | The waiting of the layer name for obtaining full data timed out. |
Notes
1. After a WebSocket connection is initially established or reused on a client, a message containing an ID will be sent to the server to indicate that the connection has been successfully established.
2. WebSocket supports connection reuse, and only one connection is established for one URL.
3. When multiple functions share the same WebSocket connection, data received for each function can be distinguished by ID, enabling on-demand data distribution.
4. When the full initialization scenario function is configured, the incremental data processing rules are as follows:
Incremental data received before the initialization data is received is discarded.
Incremental data received before the scene is fully loaded and after the initialization data is received will be updated normally.
5. When the WebSocket connection is abnormally disconnected, the system supports an automatic reconnection mechanism and can attempt to reconnect up to 5 times.
If the connection is closed without a status code 1000, it is considered an abnormal disconnection. The system will trigger an automatic reconnection and output an error message.
If the connection is closed with a status code 1000, it is considered a normal closure, and the system will not attempt to reconnect.