Common Title

更新时间:
复制 MD 格式

Configure and use the Common Title widget to display titles and key information in your data dashboard.

Overview

The Common Title widget displays the core content or key information of a module. You can use multiple Common Title widgets in a data dashboard to label different sub-modules.

Scenarios

Use the Common Title widget to add titles and descriptions to a visualization application, making the subject of each section immediately clear. The widget also supports interactions with other widgets to control which dimension views or data content are displayed.

Examples

  • Static title

    image.png

  • Interactive scenario

    19577664-CFE8-4D57-B32D-9804B40A8E43

  • Hyperlink redirection

    DCF34FEB-3284-4AF3-80BB-07FE614A83BF

Prerequisites

Add the Common Title widget

  1. Access the DataV console.

  2. On the Workbench page, in the Data Dashboards area, hover over the target dashboard and click Edit. The canvas editor opens.

  3. In the navigation pane on the left, follow the steps in the figure to add the Common Title widget to the canvas.image

You can also use the global search feature to add the widget.

Connect to business data

After you add the widget, you must connect it to a data source. Click the Common Title widget. On the Data Source tab in the right-side configuration panel, select a data source for the widget.image

  • The following table describes the data fields that the Common Title widget accepts.

    Field

    Description

    value

    (Optional) The content of the title. If this field is not empty, its value overwrites the configuration in the style settings. If this field is empty, the content from the Style > Basic Style > Title Content setting is used.

    url

    (Optional) The hyperlink address for the title. If this field is not empty, its value overwrites the configuration in the style settings. If this field is empty, the URL from the Style > Interaction > Hyperlink Configuration > Hyperlink setting is used.

    The data structure and an example of a generic title are shown below.

    [
      {
        "value": "DataV Official Website",
        "url": "https://www.aliyun.com/product/bigdata/datav?spm=5176.28536895.nav-v2-dropdown-menu-0.d_main_8_2_0.2d5b586cgSLMNb"
      }
    ]

    In the preview or published view, you can click the widget to go to the specified link.

    image

  • This section describes the core configuration items for the data source.

    Configuration

    Description

    Select Data Source

    Supports various data types, such as CSV files, APIs, and different databases. For more information, see Supported data source types. Edit data fields in a visual table or in code.

    Configure Filter (Optional)

    Customize filter code to transform, filter, display, and perform simple calculations on data. For more information, see Manage data filters.

    Configure Data Mapping

    Map fields from the selected data source to the widget's fields. This enables real-time data matching. Click the image icon to configure field styles.

    View Response Result

    Displays the data connected to the widget in real time. When the widget's data source changes, this section shows the latest data.

    • Click the data response result to view the data field code.

    • Click View Example to see the array type and sample code that the data source accepts. You can write your fields based on the example.

    Other data request configurations:

    • Disable Loading State: If you check this box, the widget's initial loading content does not appear when the widget updates or when you preview the data dashboard.

    • Controlled Mode: If you check this box, the widget does not request data when it initializes. Data requests can only be started by the blueprint editor or by global variable events.

    • Auto Update Request: If you check this box, the platform polls for data updates at the interval you set. If you do not check this box, you must refresh the page manually or use the blueprint editor or global variable events to trigger data updates.

Configure the Common Title widget

Click the Common Title widget to open the right-side configuration panel, where you can set basic styles, global variables, interaction events, and blueprint interactions.

Style configuration

On the Style tab, configure the text size, layout, and background color for the Common Title widget.

Note

You can also click the image icon and use keywords to search for a specific parameter. The search feature supports fuzzy matching. For more information, see Search for configuration items.

The following table describes the configuration items.

Parameter

Description

Example

Global Configuration

Defines the widget's position, transparency, and interaction penetration in the data dashboard.

  • Opacity: The smaller the value, the more transparent the widget. The value ranges from 0 to 1.

  • Interaction Penetration: If you enable this feature, the mouse can pass through this widget. This prevents the widget from blocking mouse interactions with underlying widgets when there are many widgets on the dashboard.

image

Basic Style Configuration

Defines the title content and styles such as text size, layout, color, and whether to use an ellipsis for overflow. If you enable overflow ellipsis, overflowing text is replaced with an ellipsis.

image

Interaction Configuration

Sets the hyperlink and hand cursor for the Common Title widget.

  • Hyperlink: After you configure a link, you can click the Common Title widget in the preview or published view to go to the link.

  • Open in New Window: If you enable this feature, clicking the Common Title widget in the preview or published view opens the link in a new browser window. If this feature is disabled, the link content is displayed in the current page.

  • Hand Cursor: If you enable this feature, the cursor changes to a hand when you hover over the Common Title widget while previewing the dashboard.

image

Advanced Configuration

Define interactions and data transfer relationships between the Common Title widget and other widgets.

Parameter

Description

Example

Interaction Event

Defines interaction behaviors with other widgets to enable filter interactions. The example shows how to use the Common Title widget to control the display of sales data from different dimensions.19577664-CFE8-4D57-B32D-9804B40A8E43

Click the image icon to define relevant interaction events and actions.

image

Associate Global Variable

You can associate global parameters in the widget to pass parameters between widgets for interaction. Click the image icon to enable the corresponding instruction and associate the required global variable with it.

When You Click The Title, a callback value is returned. By default, the callback contains the value and url field values from the data. For details about the configuration, see Component Interaction Settings.

Blueprint interaction

Use the Blueprint Editor to visually define interaction logic between widgets using a node-based approach.

Procedure

  1. On the canvas editor page, click the image icon in the upper-left corner of the menu bar to open the Blueprint Editor.

  2. In the layer node list, hover over the Common Title widget and click the image icon to add the widget to the main canvas.

  3. Connect the nodes to configure the blueprint interactions for the widgets.

    The following figure shows an example.image

Parameter description

The following table describes the interaction events and actions.

Note

In the blueprint configuration interface, you can also click the image icon next to an event or action to view detailed information about its parameters.

Category

Subcategory

Description

Event

When Data Is Updated

This event is thrown when the widget data is updated.

When Data Request Status Changes

This event is thrown when the data request status changes. Status values include Void, Loading, Success, and Error.

When Title Is Clicked

This event is thrown when the title is clicked. The corresponding data item is also thrown. The following code shows a data example.

{
    "value": "Title",
    "url": "https://www.aliyun.com"
}

Action

Import Data

Processes data according to the widget's format, then imports it to redraw the widget. This does not require re-requesting data from the server-side. The following code shows a data example.

[
  {
    "value": "Title",
    "url": "https://www.aliyun.com"
  }
]

Request Data

Re-requests data from the server-side. Data thrown from an input data processing node or a layer node is used as a parameter. For example, if the API data source configured for the Common Title widget is https://api.test and the data passed to the Request Data action is { id: '1'}, the final request is https://api.test?id=1.

Move

Moves the widget to a specified position. The following code shows a data example.

    {      
      // Movement method. Absolute positioning: to, relative positioning: by. Default: to.
        "positionType": "to",
      // Specified position. x-coordinate, y-coordinate.
      "attr": {
        "x": 0,
        "y": 0
      },
      // Animation method.
      "animation": {
        "enable": false,
        // Animation delay in ms.
        "animationDuration": 1000,
        // Animation curve. Optional values: linear|easeInOutQuad|easeInOutExpo.
        "animationEasing": "linear"
      }
    }

Toggle Visibility

Switches the widget between visible and hidden. The following code shows a data example.

{
  "animationType": "fade",
  "animationDuration": 1000,
  "animationEasing": "linear"
}
  • animationType: The animation method. You can set this to appear (appear/disappear), fade (fade in/fade out), or slideToUp (fly in/fly out). If not configured, there is no animation.

  • animationDuration: The animation delay. Default: 1000 ms.

  • animationEasing: The animation curve. You can set this to linear (constant speed), easeInOutQuad (smooth), or easeInOutExpo (slow-fast-slow).

Show

Hide

Update Widget Configuration

Dynamically updates the style configuration of the widget.

  1. First, on the widget's Style panel, click Copy Configuration to Clipboard to get the widget's configuration data.

  2. In a data processing node on the Blueprint Editor configuration page, change the field values for the corresponding styles as needed.

Demo

This demo uses the carousel feature of the Tab List widget to dynamically update the Common Title widget.

  1. Add widgets to the canvas.

    1. Access the DataV console.

    2. Select a data dashboard and click Edit to go to the canvas editor.

    3. From the widget library in the navigation pane on the left, add the Tab List and Common Title widgets to the canvas.image

  2. Configure the blueprint interaction.

    1. Click the image icon in the upper-left corner of the page to open the Blueprint Editor.

    2. On the Layer Node tab on the left, hover over a widget and click the image icon to add the widget to the main canvas.

      Perform this operation for both the Common Title and Tab List widgets.

    3. On the Logic Node tab on the left, hover over the serial data processing node and click the image icon to add the node to the main canvas.

    4. Connect the widgets as shown in the following figure. When a user clicks a tab in the Tab List, the corresponding data is imported into the Common Title widget.image

    5. Click the serial data processing node and configure its processing method.image

      return [{value:data.content}];
  3. Click Preview in the upper-right corner of the page to preview the result.F4D7FB80-C7C1-4D59-9ED0-04252549C503

  4. (Optional) To go to a specific tab, add a Condition node before the serial data processing node. The processing method is executed only when the condition is met. Otherwise, a default value is displayed. For example, you can prevent the content of the first tab from being displayed.image

    • Condition node

      return data.id > 1;
    • Serial data processing: Condition met

      return [{value:data.content}];
    • Serial data processing: Condition not met

      return [{value: "This is the title data"}];
  5. Click Preview in the upper-right corner of the page to preview the result.4EB229AF-1CFD-4806-96A5-32AF54A29784