This topic describes how to configure data interfaces for a block.
In the block editor, click the
icon in the upper-right corner. On the Data Interface Settings tab, you can perform the following operations.
Switch modes
At the top of the dialog box, you can switch between View Mode and Code Mode.
| Mode | Description |
| View Mode | In View Mode, visually inspect the style of the sample data interface and customize its content based on the sample style without writing code.
|
| Code Mode | In Code Mode, write custom code for the data interface based on the sample interface code. Use this method to add or configure the data interface content.
Note For more information about data interface code specifications, see
Widget developer guide.
|
Configure data interfaces
On the Data Interface Settings tab, a sample data interface is provided by default. You can customize the data interface by performing the following operations.
| Operation | Description |
| Expand the data interface details list | Click the |
| Edit basic information of the data interface | Each data interface contains multiple parameters. You can customize the following basic information parameters for the data interface.
|
| Delete a data interface | Click the |
| Add a data interface | On the Data Interface Settings tab, click Add Data Interface to add a new data interface to the configuration area.
Note You can add or edit multiple data interfaces for the block.
|
Configure data fields
On the Data Interface Settings tab, a sample data field is added by default. You can customize the data field by performing the following operations.
| Operation | Description |
| Edit basic information of the field | Each data field contains multiple parameters. You can customize the following field parameters.
|
| Add a field | Click the |
| Adjust field position | If you have multiple field rows, you can click the |
| Delete a field | Click the
Note If you delete all fields, you can click
Add Field to add a new field row.
![]() |
| Configure default data for a field | You can configure default data for a field to use as sample data.![]() |
View and use data interfaces in a visualization application
After you configure a data interface in the block editor, you can view the data interface information for the block in the canvas editor. To configure and view the interface information in a visualization application, perform the following steps.
- In the block editor, preview and test the configured data interface. After testing is complete, publish the block. For more information, see Preview a block and Publish a block.

- Switch to the My Visualizations page in the console. Hover over a visualization application and click Edit to enter the canvas editor.
- Click the
icon to expand the All Assets list and select the Blocks module. The list displays all published blocks. - Click the desired block to add it to the canvas editor.
- Select the block on the canvas. In the configuration panel on the right, select the Data tab to view the configuration information of the block's data interface. You can also modify the block's data. For more information, see Configure asset data and Set an asset data source.
Real-time preview of the data interface configuration
On the Data Interface Settings tab, the dialog box is split into two areas. The left area is for customizing the data interface, and the right area provides a real-time preview. Any changes you make on the left are immediately displayed in the preview area on the right, allowing you to easily view the configured data interface.


