colored-area

更新时间:
复制 MD 格式

Configure the appearance and behavior of the color block widget, including background color and filter effects.

Chart style

A color block is a media component that supports background color modification and filter effects. image.png

Style Panel image.png

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

    • Size: the width and height of the widget, in pixels.

    • Positioning: the x-axis and y-axis of the widget, in 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: rotates the widget around its center, in degrees.

      • Enter a value 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, and a value of 1 fully displays it. Default value: 1.

  • Color Background: the background color of the color block.

  • filter Effect: sets the visual effect of the color block, such as blur and saturation. Enter custom CSS filter codes.

    imageWith filter applied imageWithout filter applied

    Note

    The filter configuration example uses the blur function. For more information, see Cascading Style Sheets (CSS)-filter.

Data Sources panel

This component does not support data configuration.

Advanced Panel

This widget does not support interaction events.

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

    • Event: The color block widget does not support events.

    • Action

      Action

      Description

      Move

      Moves the widget to a specified location. See the data example below.

          {
            // 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 widget visibility. No parameters are required.

      Display

      Displays the widget. See the data example below.

      {
        "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. See the data example below.

      {
        "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 widget style configurations. In the Style panel, click Copy Configuration to Clipboard to obtain the widget configuration data, then modify the style field in the data processing node of Blueprint Editor.