You can create an action interface to allow external widgets to call a block. For example, if an external widget needs to control the color of a Vertical Capsule Column Chart widget within the block, you can create an Update Style action. You can use this action in the blueprint editor of the visualization application. This topic describes how to configure action interfaces within a block and explains the purpose of this feature.
In the block editor, click the
icon in the upper-right corner and configure actions on the Action Settings tab.
Switch modes
At the top of the dialog box, you can switch the action mode. The options are View mode and Code mode.
Mode | Description |
View mode | In view mode, you can see the style of the sample action. Configure your action based on the sample style without writing code. The following image shows an example of the action panel in view mode. |
Code mode | In code mode, you can write custom code for your action based on the sample code. This lets you add or configure actions. The following image shows an example of the action panel in code mode. Note For information about the code standards for action interfaces, see Overview of widget developer package files. |
Configure an action interface
On the Action Settings tab, a sample action is provided by default. You can customize this action.
Operation | Description |
Expand the action details | Click the |
Edit basic action information | Each action contains multiple parameters. You can edit the basic information of the action.
|
Delete an action | Click the |
Add an action | On the Action Settings tab, click Add Action to add a new action in the configuration area below. Note You can add or edit multiple actions for the block interface. |
Configure action fields
In the action configuration panel, sample action fields are added by default. You can customize these fields.
Operation | Description |
Edit basic field information | Each action field contains multiple parameters. You can edit the field parameters.
|
Add a field | Click the |
Arrange fields | If the data interface has multiple field rows, click the |
Delete a field | Click the Note After you delete all fields in the list, you can click Add Field in the field list to quickly add a new field.
|
View and use action interfaces in a visualization application
After you configure an action interface in the block editor, you can use the block in a visualization application. The blueprint editor displays all action interfaces for the block. Follow these steps to configure and view the interface information in a visualization application.
In the block editor, preview the configured action interface and test the data interface. After the interface test is complete, publish the block. For more information, see Preview Block and Publish Block.

Switch to the Workbench page. Hover over a dashboard and click Edit to open the canvas editor.
Click the Widget Library tab, select the Blocks module, and view all published blocks in the block list.
Click a block to add it to the canvas editor.
Right-click the block on the canvas and select Enter Blueprint Editor. You can then view all the events and action interfaces for the block in the blueprint editor.
Other widgets in the blueprint editor can call the event and action interfaces by wiring and configuring logic nodes. For more information, see Function Introduction.

Preview action configurations in real time
On the Action Settings tab, the left side of the dialog box is the area where you customize actions, and the right side is the real-time preview area. All action parameters that you configure on the left are immediately displayed in the preview interface on the right. This lets you easily check the configured actions.




