All Products
Search
Document Center

DataV:Tab list

Last Updated:May 15, 2023

This topic describes the configuration items of a tab list.

Chart Style

A tab list belongs to the Interact category. It allows you to dynamically display tabs in your DataV project by using interaction events with other widgets. You can configure the color, quantity, type, and style of the tabs. image..png

Settings Panelimage..png

  • 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 asset configurations.
  • Size: indicates the size of a widget, including its pixel width and height. You can click the Proportional resizing 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 Rotation control icon icon.
    • Click the Horizontal flip icon to horizontally flip a widget.
    • Click the Vertical flip 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 of the tab list.

  • Background Color: the background color of the tab list.

  • Rows: the number of rows in the tab list.

  • Columns: the number of columns in the tab list.

  • Selection Type: the selection type of the tab list. Valid values: Single Selection and Multiple Selection.

  • Carousel: the carousel interval of the tab list. Click on the left side 眼睛图标to enable or disable the carousel effect.

  • Tab Selected During Initiation: the ID of the tab to be initially selected. The value of this parameter must be the same as the value of the id parameter on the Data tab. If Selection Type is set to Single Selection, you can enter only one value. If Selection Type is set to Multiple Selection, you can enter multiple values. Separate the values with commas (,).

    Figure 1. Select Type as Single 选择类型为单选

    Figure 2. Select Type as Multiple 选择类型为多选

    Figure 3. Tab list initialization values Tab列表的初始化值

  • All Button: specifies whether to display the ALL tab. This parameter is available only when the Selection Type parameter is set to Multiple. Tab列表全部按钮

  • All Tabs Selected During Initiation: specifies whether to select all tabs by default. If you turn on the switch, the Tab Selected During Initiation parameter does not appear. This parameter is available only when the Selection Type parameter is set to Multiple. Tab列表初始化全选

  • Tag Default Configuration Tab列表标签默认配置

    Parameter

    Description

    Font size

    The font size of the tabs.

    The color of the font.

    The font color of the tabs. For more information, see Color picker.

    Font Weight

    The font weight of the tabs.

    Background Color

    The background color of the tabs.

    Fillet Radius

    The corner radius of the tabs. A larger value indicates more rounded corners. Default value: 0. This value indicates that the tabs are rectangles.

    Hover Background Color

    The background color of a tab when you move the pointer over the tab. You can view the configuration effect only on the preview or publish page.

    Selected Text Color

    The text color of the selected tabs.

    Selected Background Color

    The background color of the selected tabs.

    Icon configuration

    The width, height, and position of the tab icon, as well as the distance between the icon and text.

  • Callback ID: the variable used to associate data between widgets. The callback ID must be a parameter configured on the Data tab.

    Important

    If the version of your widget is not the latest, upgrade the widget xxx and configure callback IDs in the Interaction tab.

Data Panel

image..png

Configuration field description

Parameter

Description

id

The ID of a tab. The Tab Selected During Initiation parameter on the Setting tab defines the ID of the default selected tab based on this parameter.

content

The text on a tab.

Table 1. Parameters
ParameterDescription
Controlled ModeIf 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 RequestAfter 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 SourceIn 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 FilterIf 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 ResultThe response to a data request. If the data source changes, you can click the Refresh icon icon next to Data Response Result to view the data response in real time.

Interaction Panelimage..png

Select the Enable check box to enable interactions between widgets. When you click a tab, a data request is triggered to pass callback IDs to dynamically load data. By default, the id and content parameters are passed. For more information, see Configure a callback ID.

Configure interactions in Blueprint Editor

  1. In Canvas Editor, right-click a widget in the Layer panel and select Add to Blueprint Editor.
  2. Click the Blueprint Editor icon icon in the upper-left corner of the page.
  3. In Blueprint Editor, click the Tab List component in the Import Nodes pane. You can view the configuration parameters of the Tab List component on the canvas, as shown in the following figure. Tab列表蓝图编辑器参数配置

    • Event

      Event

      Description

      When the data interface request is completed

      The event is triggered with the processed JSON data after a data interface request is responded and processed by a filter. For specific data, see Data.

      When Tab is clicked

      When you click a tab, this event is triggered to pass data of the tab.

    • Policy Action

      Policy Action

      Description

      Request Data Interface

      This action is performed to request the server data again. The data sent by an upstream converter or layer node is used as a parameter. For example, in the tab list, the API data source is http://api.test, and the data passed to the request geographic search box interface is { id: '1'}, the final request interface is http://api.test?id=1.

      Import data

      After data of a widget is processed in accordance with its drawing format, the widget is imported for redrawing. You do not need to request server data again. For specific data, see Data.

      Select Item

      This event selects one or more tabs and needs input of an array or object.

      Enable carousel

      This action enables the carousel for the tab list.

      Disable carousel

      This action disables the carousel for the tab list.

      Switch to All

      This action selects or deselects all tabs.

      Update component configurations

      Style configurations of widgets are dynamically updated. Before this action is executed, you must click the widget in Canvas Editor, click the Settings tab in the right-side panel, and click Copy Configurations to... to obtain widget configurations. Then, paste the data to the box of a data processing node in the blueprint editor and configure the field values.

      Display

      A widget is shown without the need to specify parameters.

      Hide

      A widget is hidden without the need to specify parameters.

      Switch to the implicit state

      A widget is hidden or shown. Examples of reference data are as follows.

          {
            //true indicates that a widget is shown, whereas false indicates that a widget is hidden. 
            "status": true,
            // Animation is displayed. 
            "animationIn": {
              // The animation type, which can be set to fade. If it is not specified, no animation is displayed. 
              "animationType": "fade",
              // The duration in which animation is displayed. It is in the unit of milliseconds. 
              "animationDuration": 1000,
              // The function that is used to display animation. You can set this parameter to linear|easeInOutQuad|easeInOutExpo. 
              "animationEasing": "linear"
            },
            // Animation is hidden. 
            "animationOut": {
              // The animation type, which can be set to fade. If it is not specified, no animation is displayed. 
              "animationType": "fade",
              // The duration in which animation is hidden. It is in the unit of milliseconds. 
              "animationDuration": 1000,
              // The function that is used to hide animation. You can set this parameter to linear|easeInOutQuad|easeInOutExpo. 
              "animationEasing": "linear"
            }
          }

      Move

      A widget is moved to a specified location. Examples of reference data are as follows.

          {
            // The positioning type. to indicates absolute positioning, whereas by indicates relative positioning. The default value is to. 
              "positionType": "to",
            // The location, which is indicated by the x and y coordinates. 
            "attr": {
              "x": 0,
              "y": 0
            },
            // The animation type. 
            "animation": {
              "enable": false,
              // The duration in which animation is displayed. 
              "animationDuration": 1000,
              // The animation curve, which can be set to linear|easeInOutQuad|easeInOutExpo. 
              "animationEasing": "linear"
            }
          }