This topic describes how to configure data interfaces within a block.
In the block editor, you can click the
icon in the upper-right corner of the block editor. On the Data Interface Settings tab, you can configure the following data interfaces.
Switch between the edit mode and the revision mode
In the upper part of the dialog box, you can switch the data interface mode. You can select View Mode or Code Mode.
Value of mode | Description |
View Mode | In view mode, you can view the style of the sample data interface and customize the content of the data interface based on the sample style without writing code. View Mode Configuration Panel Example |
Script mode | In code mode, you can customize the code of the required data interface based on the sample interface code. Implement the contents of a new or configured data interface. Note For more information about how to configure data interface code, see Overview. |
Configure Data Interface
On the Data Interface Settings tab, you can configure a data interface by default. 
Operation | Procedure |
Expand Data Interface Details List | Click the |
Edit the basic information of a data interface | Each data interface contains multiple parameters. You can customize the basic information of the data interface.
|
Delete Data Interface | Click the |
Add a data interface | On the Data Interface Settings tab, click Add Data Interface to add a new data interface in the Data Interface Settings section. Note You can add or edit multiple data interfaces for block interface use. |
Configure data fields
On the Data Interface Settings tab, the system automatically adds two sample data fields by default. You can customize the data fields by operation. 
Operation | Procedure |
Edit basic field information | Each data field contains multiple field parameters. You can customize the parameter content of a field.
|
Create a field. | Click the |
Adjust Field Position | After you add multiple field rows to a data interface, you can click the |
Delete a field | Click the Note After you delete all fields from the field list, you can click Add Field to add a field.
|
Configure field default data | You can configure the default data of an added field as the sample data content of the field. |
View and use data interfaces in visual applications
After you configure data interfaces in the block editor, you can view all data interfaces of a block when you use the block in Canvas Editor. To configure and view interface information in a visualization application, perform the following steps:
In the block editor, preview and test the configured data interface content. After the interface is tested, publish the block.

Switch to the console page in the console. Move the pointer over a dashboard and click Edit to enter Canvas Editor.
Click the Component Library tab and select Block. You can view all published blocks in the block list.
Click a block to add the block to Canvas Editor.
Click a block on the canvas. In the right-side configuration panel, click the Data Source tab to view all configurations of the data interface of the block.

Real-time Preview Data Interface Configuration
On the Data Interface Settings tab, the left side of the dialog box is used to configure custom data interfaces. The right side of the dialog box is the real-time preview area. All data interface parameters configured on the left side can be directly displayed on the preview page on the right side, so that you can view the configured data interface parameters. 





