cascade-selectors

更新时间:
复制 MD 格式

Configure all available settings for the cascade selector in full selection mode.

Note

Cascade selectors are not supported on mobile devices. For updates, see the DataV official website.

Chart style

A cascade selector is an advanced control component that serves as a cascade form in visual applications. It submits user-selected data to the backend for processing, or displays user-selected content on other components through interactive configuration. image

Style Panel image.png

  • Search Configuration: Click the Search configuration items icon imagein the upper-right corner of the Style panel to search for a configuration item by name. Fuzzy match is supported. For more information, see Search configuration items.

    • Size: the width and height of the widget. Unit: pixels.

    • Positioning: the x-axis and y-axis of the component. Unit: pixels. X-coordinate is the pixel distance between the upper-left corner of the widget and the left border of the canvas. Y-coordinate is the pixel distance between the upper-left corner of the widget and the upper border of the canvas.

    • Rotate: The rotation angle of the widget around its center. Unit: degrees.

      • Enter the degrees in the Rotation Angle spin box, or click the plus sign (+) or minus sign (-) to adjust the value.

      • Click the imageicon to flip the widget style.

      • Click the imageicon to flip the widget style.

    • Opacity: Valid values: 0 to 1. A value of 0 hides the widget. A value of 1 fully displays the widget. Default value: 1.

  • Input box

    • Default Selected: Enter the default selected path, with items separated by commas (,). Example: zhejiang,hangzhou,xihu.

    • Prompt Text: the placeholder text displayed in the input box when no value is selected.

    • No Data: the text displayed when the drop-down list is empty.

    • Feature Enhancement: the feature enhancement style of the input box.

      Metric

      description

      Drop-down search

      If you turn on the switch, you can enter search keywords in the input box to filter the drop-down list. If you turn off the switch, custom search is disabled.

      Clear Selected

      If you turn on the switch and the input box has a value, a Clear button 删除图标appears when you hover the mouse over the input box. Click the icon to clear the input box content. If you turn off the switch, the clear feature is disabled.

      Instant Change

      If you turn on the switch, the input box content updates in real time when a drop-down option is selected. If you turn off the switch, instant change is disabled.

      Disable

      Turn on the switch to disable the cascade selector. Turn off the switch to use the cascade selector normally.

    • Background Color: the background color of the cascade selector.

    • Border Style: the border style of the cascade selector. You can set the line thickness, line type, line color, corner radius, and shadow color.

    • Text Style: the style of the text in the cascade selector.

      Metric

      description

      Text Margins

      The left margin of the display text inside the cascade selector.

      Text Style

      The font family, font weight, font size, and color of the text in the cascade selector.

    • Auxiliary Key: the auxiliary key style of the cascade selector, including the drop-down arrow and clear icon.

      Metric

      description

      Size

      The size of the auxiliary button in the cascade selector.

      Right Margin

      The right margin of the auxiliary key in the cascade selector.

      Drop-down arrow

      Turn on the switch to display and configure the color of the drop-down arrow. Turn off the switch to hide the drop-down arrow.

      Clear icon

      The icon color and background color of the clear button in the cascade selector.

  • Drop-down Box

    • Height: the height of the drop-down box.

      Metric

      description

      Container height

      The overall height of the drop-down list container.

      Container Top Spacing

      The distance between the top of the drop-down container and the cascade selector. Unit: px.

    • Background: the background color of the drop-down box.

    • Border: the border style of the drop-down box.

      Metric

      description

      thickness

      The thickness of the drop-down box border.

      Type

      The border line type of the drop-down box. Valid values: Solid Line, Dashed Line, and Dotted Line.

      Color

      The color of the drop-down box border.

      Fillet

      The border radius of the drop-down box. Valid values: 0 to 360. A value of 0 produces a square box. A value of 360 produces a fully rounded box.

    • Option Style: the style of the option text in the drop-down list.

      Metric

      description

      Option Height

      The height of each option in the drop-down box. Unit: pixels.

      Text Style

      The text style of options in the drop-down box, including font family, font weight, font size, and color.

      Text Color

      The text color in the drop-down box for the hovered and selected states.

      Background Color

      The background color of options in the drop-down list for the default, hovered, and selected states.

      Right Arrow

      • Right Margin: the distance between the right arrow and the right edge.

      • Size: the size of the right arrow.

      • Color: the color of the right arrow.

      Secondary Menu

      The display mode of the secondary menu. Valid values: Click and Hover.

Data Sources panel image

Column

Description

label

The label text displayed for each option in the cascade selector.

value

The actual value of each option in the cascade selector.

children

The child nodes of the current data node in the cascade selector.

disabled

Whether the current option is selectable. A value of true indicates selectable.

title

The tooltip content displayed on hover.

Configure data items

Description

Data sources

You can use the code editor or visual editor to view the data fields of the widget. You can also change the data type to flexibly configure the component data.

Data Mapping

To customize chart field configurations, set field mappings in the Data Mapping module to map data to the corresponding widget fields. This allows you to match data without modifying the data source fields. You can also click the imageicon to configure the field style.

Configure a filter

Turn on Filter, select or create a data filter, and configure a filter script to process data. For more information, see Manage data filters.

Data Response Result

Displays the widget data in real time. If the data source changes, this section shows the latest data. If the system response is delayed, click the imageicon to view the data response result, or click the imageicon to refresh the data. You can also click View Example to view a sample response result.

Forbid Loading

Select the check box to skip loading animations during component initialization when previewing the data dashboard. Clear the check box to show loading animations. By default, the check box is cleared.

Controlled Mode

Select the check box to prevent the component from requesting data during initialization. Data can only be requested through global variables or methods configured in Blueprint Editor. Clear the check box to allow automatic data requests. By default, the check box is cleared.

Auto Data Request

Select the check box and specify a polling interval to enable automatic data refresh. Clear the check box to disable automatic updates. In this case, you must manually refresh the page or use Blueprint Editor and global variable events to trigger data updates.

Advanced Panel

Turn on the switch to enable the global variable feature. You can change the selected items in the cascade selector, trigger data requests, and pass temporary variables for use in other components. By default, the value configured in the Data Source panel is displayed. For more information, see Component interaction configuration.

Blueprint Interaction

  1. Click the imageicon in the upper-left corner to go to the Blueprint page.

  2. On the Layer Nodes tab, add the widget to the main canvas.

  3. View blueprint configuration parameters. image.png

    • Event

      Event

      Description

      When the data interface request is completed

      After a data interface request is completed and processed by a filter, this event is triggered with the processed JSON data. For specific data examples, see the Data Response Result section on the Data Source tab in the right-side configuration panel of the canvas editor.

      When the drop-down list is selected

      This event is triggered when a drop-down option is selected, along with the corresponding data item. For more information, see the data example.

      [
        {
          "value": "zhejiang",
          "label": "Zhejiang"
        },
        {
          "value": "hangzhou",
          "label": "Hangzhou",
          "title": "Data to be accessed"
        }
      ]
    • Action

      Action

      Description

      Import data

      After widget data is processed in the required drawing format, this action imports the data for redrawing without re-requesting server data. For more information, see the data example.

      [
        {
          "label": "Zhejiang",
          "value": "zhejiang"
        }
      ]

      Request Data Interface

      Requests server data again, using data from an upstream data processing node or layer node as parameters. For example, if the API data source is https://api.test and the data passed to the request data interface is { id: '1'}, the final request URL is https://api.test?id=1.

      Set Selected Entries

      Specifies the selected entry in the cascade selector. For more information, see the data example.

      [
        "zhejiang",
        "hangzhou",
        "xihu"
      ]

      Clear selected entries

      Clears the selected entry in the cascade selector. No parameters are required.

      Clear a component to its default value

      Resets the component to its default value. No parameters are required.

      Move

      Moves the widget to a specified location. For more information, see the data example.

          {      
            // 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"
            }
          }

      Toggle Display

      Toggles the widget between visible and hidden. No parameters are required.

      Display

      Displays the widget. For more information, see the data example.

      {
        "animationType": "",// The animation method. Valid value: fade. If you do not specify this parameter, no animation is generated. 
        "animationDuration": 1000,// The animation delay. Unit: ms. 
        "animationEasing": ""// animation curve
      }

      Hide

      Hides the widget. For more information, see the data example.

      {
        "animationType": "",// The animation method. Valid value: fade. If you do not specify this parameter, no animation is generated. 
        "animationDuration": 1000,// The animation delay. Unit: ms. 
        "animationEasing": ""// animation curve
      }

      Update component configurations

      Dynamically updates the style configurations of the widget. In the Style panel, click Copy Configuration to Clipboard to obtain the widget configuration data. Then modify the style field for the data processing node in Blueprint Editor.