Marquee

更新时间:
复制 MD 格式

The marquee widget dynamically scrolls overflow text from right to left in your visualization applications.

Overview of the component

A text widget that dynamically scrolls overflow text from right to left in visualization applications.

Note

If the text length is shorter than the widget, the content will remain static and not scroll.

Scenarios

Commonly used to highlight important text in visualization applications, such as reminder notifications or live comments.

Effect display

  • Single-line textC70EC01B-B4EE-4E9C-ADDF-B349673960BA

  • Multi-line text265595BC-D732-4AB0-A682-C37F5103868E

Prerequisites

Add a marquee

  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 left-side navigation pane, under the Widget Library > Information list, click the Marquee widget to add it to the canvas.

You can also use global search to find and add related widgets.

Integrate business data

Once the widget is added, bind your business data for display. Click the marquee, and in the right-side Data Source tab, select the data for the widget to render. image

  • The marquee accepts the following data fields.

    Field

    Description

    value

    The dynamic text content displayed by the widget.

    • Only the first value is read if multiple values exist.

    • Supports the <br> tag for line breaks.

    The following example shows the data structure and display of a marquee.

    [
      {
        "value": "DataV-Board is a professional data dashboard building tool. <br>You can use DataV-Board to create your own large screen!"
      }
    ]

    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 marquee

Click the marquee widget and use the right-side panel to configure its basic style, interaction occurrences, and blueprint interactions.

Style configuration

In the Style panel, adjust the text size, layout, animation duration, and other style properties. The configuration items are described below.

Note

Use the image icon to search for specific configuration items by keyword. The search feature supports fuzzy matching. For more information, see Search configuration items.

The configuration items are described below.

Configuration Item

Description

Illustration

Global configuration

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

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

  • Interaction Passthrough: If you turn this on, mouse events pass through the widget. This is useful when many widgets are on the dashboard and you need to interact with widgets in lower layers.

image

Basic style configuration

Sets the text size, font, color, and text shadow of the widget.

Note

Text shadows can be stacked but cannot exceed 3 layers. Excessive use may degrade platform performance.

image

Animation configuration

Specifies whether the widget uses carousel mode. When enabled, the content scrolls with animation. The playback rate and duration settings are as follows:

  • When enabled, the marquee plays at a constant speed. You must set the animation interval. When disabled, you can set the duration for each animation cycle.

  • The time in milliseconds to play 100 frames of animation. Takes effect only when Constant Speed Playback is enabled.

  • The time in milliseconds for each animation cycle. Takes effect only when Constant Speed Playback is disabled.

  • The duration in milliseconds that text remains static before and after animation playback.

image

Advanced configuration

Configure interactions between the marquee and other widgets. The configuration items are described below.

Configuration Item

Description

Illustration

Interaction occurrences

Configures the interaction behavior with other widgets for filter-based interaction. Click the image icon to define the interaction occurrences and actions.

image

Blueprint interaction

Use the Blueprint Editor to visually define interaction logic between widgets.

Procedure

  1. On the canvas editing page, click the image icon at the top left of the menu bar to access the Blueprint Editor.

  2. Hover over the marquee widget in the layer node list and click the image to add it to the main canvas.

  3. Connect related widgets to configure blueprint interactions as needed.

    The following example illustrates a blueprint interaction. image

Introduction to configuration items

The available interaction occurrences and actions are described below.

Note

Click the image icon next to an occurrence or action in the blueprint editor for parameter details.

Category

Subcategory

Description

Event

When Data Is Updated

Triggered when the widget data is updated.

When The Data Request Status Changes

Triggered when the data request status changes. Status values include Void, Loading, Success, and Error.

Action

Import Data

Imports pre-processed data into the widget for re-rendering without re-requesting server-side data. A data example is as follows.

[
  {
    "value": "Text content"
  }
]

Request Data

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

Shift

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

{ 
  // Movement type. 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 duration.
   "animationDuration": 1000,
    // Animation curve. Optional values: linear|easeInOutQuad|easeInOutExpo.
   "animationEasing": "linear"
  }
}

Switch Visibility

Toggles the widget's visibility between shown 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 duration. The default is 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 widget's style configuration.

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

  2. In the data processing node on the blueprint editor's configuration page, change the field values for the corresponding styles as needed.