The tab list is a basic interactive widget that supports custom tab colors, quantities, types, and label styles. You can configure interactions to pair the tab list with other widgets and display the selected tab content in a visualization.
Configuration
Important This topic describes the configuration items for the tab list widget for versions earlier than v3.0. For more information about versions 3.0 and later, see Tab list (for versions 3.0 and later).
Search for Configurations: In the right-side panel of Canvas Editor, click the Settings tab, and click Search for Configurations in the upper-right corner. Enter the required configuration item in the search box, and click the search icon to quickly locate the configuration item. Fuzzy match is supported. For more information, see Search for Configurations.
Size: indicates the size of a widget, including its pixel width and height. You can click the icon to proportionally adjust the width and height of a widget. After you click this icon again, you can adjust the width and height as needed.
Position: the position of a widget, which is indicated by pixel X and Y coordinates. X-coordinate indicates the pixel distance between the upper-left corner of the widget and the left border of the canvas. Y-coordinate indicates the pixel distance between the upper-left corner of the widget and the upper border of the canvas.
Rotation Angle: the angle of a rotation that uses the center point of a widget as the rotation point. The unit is degrees (°). You can use one of the following methods to control the rotation angle of a widget:
Directly enter the degrees in the Rotation Angle spin box or click the plus sign (+) or minus sign (-) to increase or decrease the value in the Rotation Angle spin box.
Drag the black dot in the icon.
Click the icon to horizontally flip a widget.
Click the icon to vertically flip a widget.
Opacity: the opacity of a widget. Valid values: 0 and 1. If this parameter is set to 0, the widget is hidden. If this parameter is set to 1, the widget is completely displayed. Default value: 1.
Font: The font for the widget.
Background Color: The background color of the widget.
Rows: The number of rows in the tab list.
Columns: The number of columns in the tab list.
Selection Type: The selection type for the tab list. Options: Single and Multiple.
Carousel: The interval at which the tabs rotate. Click the icon to enable or disable the carousel effect.
Initial Value: The ID of the tab to be selected by default. This value must match the value of the id field in the data. If Selection Type is set to Single, you can enter only one value. If Selection Type is set to Multiple, you can enter multiple values separated by commas (,). Figure 1. Single selection typeFigure 2. Multiple selection typeFigure 3. Initial value of the tab list
All Button: Enable this option to display an ALL tab in the tab list. This option is available only when Selection Type is set to Multiple.
Select All by Default: Enable this option to select all tabs by default during initialization. If you enable this option, the Initial Value configuration item is hidden. This option is available only when Selection Type is set to Multiple.
Default Label Configuration
Parameter
Description
Font Size
The font size of the widget labels.
Font Color
The font color of the widget labels. For more information, see Color picker.
Font Weight
The font weight of the widget labels.
Background Color
The background color of the tabs.
Border Radius
The border radius of the tabs. A larger value produces more rounded corners. The default value 0 creates a rectangle.
Hover Background Color
The background color of a tab on hover. This effect is visible only on the preview or published page.
Selected Text Color
The text color of a selected tab.
Selected Background Color
The background color of a selected tab.
Icon Configuration
The width, height, and spacing between the icon and the text for tab labels.
Callback ID: A variable for field dependency between widgets. Set this parameter to a field from the data.
Important This feature has been updated and moved to the Interaction panel. This feature in the Configuration panel will be deprecated. We recommend that you upgrade as soon as possible. The new interaction feature supports configuring multiple fields.
The ID of the tab. The Initial Value configuration item uses this variable to define the tab that is selected by default.
content
The name of the tab.
Table 1. Parameters
Parameter
Description
Controlled Mode
If you turn on the switch, data is not requested when a widget is initialized. Data requests are triggered only based on callback IDs or the method configured in Blueprint Editor. If you turn off the switch, data requests are automatically triggered. By default, the switch is turned off.
Auto Data Request
After you select the Auto Data Request check box, you can enable dynamic polling, and manually specify the polling interval. If you do not select this check box, data is not automatically requested. You must manually refresh the page to request data or use Blueprint Editor or callback ID events to trigger data requests.
Data Source
In the right-side panel of Canvas Editor, click the Data tab. Click Set next to Static Data. In the Configure Datasource panel, select a data source from the Data Source Type drop-down list. Enter code for data query in the code editor, click Preview Data Response to preview the response of the data source, and then view the response. For more information, see Configure asset data.
Data Filter
If you select the Data Filter check box, you can convert the data structure, filter data, and perform simple calculations. If you click the plus sign (+) next to Add Filter, you can configure the script for the data filter in the editor that appears. For more information, see Use the data filter.
Data Response Result
The response to a data request. If the data source changes, you can click the icon next to Data Response Result to view the data response in real time.
Interaction
Select Enable to activate the interaction feature. When a tab is clicked, a data request is triggered, a callback value is returned, and the tab content is dynamically loaded. By default, the id and content values from the data are returned. For more information, see Configure a callback ID for a widget.
Blueprint Editor interaction configuration
In Canvas Editor, right-click a widget in the Layer panel and select Add to Blueprint Editor.
Click the icon in the upper-left corner of the page.
On the Blueprint Editor configuration page, click the Tab list widget in the Import Nodes section. The configuration parameters for the tab list appear on the Blueprint Editor canvas, as shown in the following figure.
Events
Event
Description
On Data API Request Completion
Triggered after the data API request is returned and processed by the filter. The processed JSON data is also returned. For more information, see the Data section.
When Tab Is Clicked
Triggered when a tab is clicked. The corresponding data item is also returned.
Actions
Action
Description
Request Data
Re-sends a data request to the server. Data from an upstream converter or layer node is used as a parameter. For example, if the API data source is http://api.test and the data passed to the Request Data action is { id: '1'}, the final request URL is http://api.test?id=1.
Import Data
Imports data in the widget rendering format to re-render the widget without sending another server request. For a data example, see the Data example above.
Select Item
Selects one or more tabs. The value can be an array or a single object.
Enable Carousel
Enables the carousel style for the tab list.
Disable Carousel
Disables the carousel style for the tab list.
Toggle Select All
Selects or deselects all tabs.
Update Widget Configuration
Dynamically updates the widget style configuration. On the Configuration panel, click Copy Configuration to Clipboard to get the configuration data, and then modify the field values in the converter on the node programming configuration page as needed.
Show
Shows the widget. No parameter is required.
Hide
Hides the widget. No parameter is required.
Toggle Visibility
Shows or hides the widget. Data example:
{
// true: show, false: hide.
"status": true,
// Show animation.
"animationIn": {
// The animation type. Set to fade. If you leave this blank, no animation is used.
"animationType": "fade",
// The show delay in milliseconds (ms).
"animationDuration": 1000,
// The show animation function. Valid values: linear, easeInOutQuad, and easeInOutExpo.
"animationEasing": "linear"
},
// Hide animation.
"animationOut": {
// The animation type. Set to fade. If you leave this blank, no animation is used.
"animationType": "fade",
// The hide delay in ms.
"animationDuration": 1000,
// The hide animation function. Valid values: linear, easeInOutQuad, and easeInOutExpo.
"animationEasing": "linear"
}
}
Move
Moves the widget to a specified position. Data example:
{
// The move type. to: absolute positioning. by: relative positioning. Default value: to.
"positionType": "to",
// The target position, including the x-coordinate and y-coordinate.
"attr": {
"x": 0,
"y": 0
},
// The animation method.
"animation": {
"enable": false,
// The animation delay.
"animationDuration": 1000,
// The animation curve. Valid values: linear, easeInOutQuad, and easeInOutExpo.
"animationEasing": "linear"
}
}