All Products
Search
Document Center

DataV:The ECharts Calendar Heatmap

Last Updated:Jul 10, 2024

This topic describes the chart style and configuration panel of the Echarts calendar heatmap.

Chart Style

image

Configuration Panel image

  • Search Configuration: Click Search Configuration in the upper-right corner of the Configuration panel. In the Search Configuration panel, enter the name of the configuration items that you want to search for to quickly locate the configuration items. 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 锁定长宽比按键icon to lock the aspect ratio of the widget and modify the width and height of the widget in equal proportion. 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 icon to control the rotation angle of the widget.

    • Click the 左右翻转图标icon to flip the widget style.

    • Click the 上下翻转图标icon to flip the widget style.

  • Opacity: Valid values: 0 to 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.

  • Legend: Click the Eye icon on the right to display the legend style. 图例

    • Top: the distance between the legend and the upper border of the widget. Default value: auto. The following types of input are supported:

      • The specific pixel value, for example, 20.

      • Percentage relative to the height and width of the container, such as 20%.

      • left, center or right, the components are automatically aligned according to the corresponding position.

    • Right: the distance between the legend and the right border of the widget. Default value: auto. The following types of input are supported:

      • The specific pixel value, for example, 20.

      • Percentage relative to the height and width of the container, such as 20%.

      • left, center or right, the components are automatically aligned according to the corresponding position.

    • Bottom: the distance between the legend and the lower border of the widget. Default value: auto. The following types of input are supported:

      • The specific pixel value, for example, 20.

      • Percentage relative to the height and width of the container, such as 20%.

      • left, center or right, the components are automatically aligned according to the corresponding position.

    • Left: the distance between the legend and the left border of the widget. Default value: auto. The following types of input are supported:

      • The specific pixel value, for example, 20.

      • Percentage relative to the height and width of the container, such as 20%.

      • left, center or right, the components are automatically aligned according to the corresponding position.

    • Width: Enter a value to adjust the width of the legend. The default value is auto, which adapts to the width of the legend.

    • Height: Enter a value to adjust the height of the legend. Default value: auto.

    • Orientation: Select the orientation of the legend from the drop-down list.

      • Horizontal: the horizontal distribution of the legend.

      • Vertical: The legend is distributed vertically.

    • Alignment: Click the drop-down list and select an alignment method for the legend and text.

      • Auto: By default, Auto is determined based on the position and orientation of the widget.

      • Left Align: If the graphic is on the left side of the text, it is left-aligned.

      • Align to Center: Align to Center if the legend graphic overlaps the text.

      • Right Align: If the graphic is on the right side of the text, it is right-aligned.

    • Pin: Click the + or-sign or enter a number to adjust the inner margin of the legend. Unit: pixels. The default inner margin is 5.

    • Element Spacing: Click the + or-sign or enter a number to adjust the distance between each item in the legend. Horizontal spacing for horizontal layout, vertical spacing for vertical layout.

    • Graph Width: Click the + or-sign or enter a number to adjust the width of the legend.

    • Graphic Height: Click the + or-sign or enter a value to adjust the height of the legend.

    • Selection Mode: Click the Eye icon to display the selection mode.

    • Off Color: Modify the color of the legend when the legend is off. For more information, see color picker description. You can see the effect only when you click the legend element on the Preview or Publish page.

    • Text Style

      • Color: Modify the color of the legend text. For more information, see color picker description.

      • Font Style: the font style of the legend text.

      • Font weight: the font weight of the legend text.

      • Font: the font family of the legend text.

      • Font Size: Click + or-, or enter a value to change the font size of the legend.

    • Background Color: Modify the background color of the legend. For more information, see color picker description.

    • Border Color: Modify the border color of the legend. For more information, see color picker description.

    • Border thickness: Click + or-, or enter a value to adjust the border thickness of the legend.

  • dialog box: Click the eye icon on the right to display the dialog box. 提示框

    • Trigger Condition: the type of the trigger. This parameter is optional. You can select Mouse Move Trigger, Mouse Click Trigger, and Mouse Move and Click Trigger.

    • Background Color: Change the background color of the dialog box. For more information, see color picker description.

    • Border Color: Modify the border color of the dialog box. For more information, see color picker description.

    • Border Size: Click + or-, or enter a value to modify the border thickness of the background frame.

    • Pin: Click the + or-sign, or enter a number manually to modify the inner margin of the background frame. Unit: pixels. The default inner margin is 5.

    • Text Style

      • Color: Modify the color of the dialog box text. For more information, see color picker description.

      • Font Style: dialog box the font style of the text.

      • Font weight: dialog box the font weight of the text.

      • Font: dialog box the font family of the text.

      • Font Size: dialog box the font size of the text.

  • Calendar 日历

    • Left: the distance between the calendar area and the left border of the widget. Default value: 80. The following types of input are supported:

      • The specific pixel value, for example, 20.

      • Percentage relative to the height and width of the container, such as 20%.

      • left, center or right, the components are automatically aligned according to the corresponding position.

    • Top: the distance between the calendar area and the upper border of the widget. Default value: 100. The following types of input are supported:

      • The specific pixel value, for example, 20.

      • Percentage relative to the height and width of the container, such as 20%.

      • left, center or right, the components are automatically aligned according to the corresponding position.

    • Right: the distance between the calendar area and the right border of the widget. Default value: 50. The following types of input are supported:

      • The specific pixel value, for example, 20.

      • Percentage relative to the height and width of the container, such as 20%.

      • left, center or right, the components are automatically aligned according to the corresponding position.

    • Bottom: the distance between the calendar area and the lower border of the widget. Default value: 60. The following types of input are supported:

      • The specific pixel value, for example, 20.

      • Percentage relative to the height and width of the container, such as 20%.

      • left, center or right, the components are automatically aligned according to the corresponding position.

    • Start Date: the start date of the calendar coordinates. It defines the range of calendar coordinates together with the End Date. The value can be one year (2022), one month (2022-08), or one day (2022-08-01).

    • End Date: the end date of the calendar coordinates. The end date and start date define the range of calendar coordinates. The value can be one year (2022), one month (2022-08), or one day (2022-08-01).

    • Calendar Size: the size of each frame in the calendar. The default value is 20.

    • Orientation: the orientation of the calendar coordinate layout. This parameter is optional and includes Horizontal and Vertical.

    • line separator: Click the eye icon on the right to display the calendar coordinate line separator.

      • Axis Style

        • Color: Modify the color of the line separator axis by referring to the color picker description.

        • Width: Click the + or-sign or enter a value to modify the width of the line separator axis.

        • Type: the type of the line separator axis. Optional. The valid values are solid lines and dashed lines.

        • Opacity: Click the + or-sign or enter a value to modify the transparency of the line separator axis. The range is [0,1].

    • Element Style

      • Ordinary Item

        • Color: Modify the background color of common elements by referring to the color picker description.

        • Border Color: Modify the border color of common item elements. For more information, see color picker description.

        • Border Width: Click the + or-sign or enter a value to modify the border thickness of the normal element.

        • Border Style: the type of the stroke that you want to use for the border. Valuable values include Solid and Dotted. Default value: Solid.

        • Transparency: Click the + or-sign or enter a value to modify the transparency of normal elements. The value ranges from 0 to 1.

    • Week Label

      • Start Week: The week starts from the day of the week. By default, the week starts from Sunday.

      • Outer Spacing: the distance between the day label and the axis.

      • Region Mapping: the day of the week. The default value is English. You can click the drop-down list to switch to Chinese.

      • Text Style

        • Color: Modify the color of the week label text. For more information, see color picker description.

        • Font Style: the font style of the week label.

        • Font weight: the font weight of the week label.

        • Font: the font family of the week label text.

        • Font Size: the font size of the week label.

    • Month Label

      • Alignment: the horizontal text alignment, including Auto, Left, Center, and Right. Default value: Automatic.

      • Outer Spacing: the distance between the month label and the axis.

      • Region Mapping: the month-to-month effect. The default value is English. You can click the drop-down list to switch to Chinese.

      • Text Style

        • Color: Modify the color of the month label text. For more information, see color picker description.

        • Font Style: the font style of the month label.

        • Font weight: the font weight of the month label.

        • Font: the font family of the month label text.

        • Font Size: the font size of the month label text.

    • Year Label

      • Outer Spacing: the distance between the year label and the axis.

      • Text Style

        • Color: Modify the color of the year label text. For more information, see color picker description.

        • Font Style: the font style of the year label.

        • Font weight: the font weight of the year label text.

        • Font: the font family of the year label text.

        • Font Size: the font size of the year label text.

    • Static: If you select this option, you cannot interact with the axes if they are static.

  • Series: Click the 加号图标or 垃圾桶图标icon to add or delete a conditional style. Click the 横排列图标or 竖排列图标icon to configure the arrangement style of multiple conditional styles. Click the 复制图标icon to copy the selected conditional style configuration and add a conditional style with the same configuration. 系列

    • Type: the display type of the data. This parameter is optional. The default value is scatter (scatter type) or effectScatter (scatter with ripple effect).

    • Name: the name of the custom series. It must be used together with the s field value in the data.

    • Hover Animation: If you select this option, the animation effect is displayed when the hover switch is enabled.

    • Legend Interaction Highlight: If you select this check box, the interaction is highlighted when the legend hover is started.

    • Marker Graphic: optional. Default value: circle. Tag types include circle, rect, roundRect, triangle, diamond, pin, arrow, none, and can also be configured as URL or path of pictures.

    • Marking size:

      • Value Mapping: If you select this check box, DataV maps the size of the tag based on the size of the data value. This check box is used together with the value scaling ratio to adjust the size of the tag. The size of the tag varies with the value. If you clear the check box, all tags have the same size and can be set in Default Size.

      • Value Scaling Ratio: If you select Value Mapping, you can set the scaling ratio of the tag size.

    • Rotation Angle: Click the + or-sign or enter a value to modify the rotation angle of the marker.

    • Static: If you select this check box, the series does not respond to and trigger mouse events.

    • Labels

      • Normal Items: Click the Eye icon on the right to display the label text of normal items (points that do not respond to mouse events).

        • Text Style

          • Color: Modify the color of the common item label text. For more information, see color picker description.

          • Font Style: the font style of the label text.

          • Font weight: the font weight of the label text.

          • Font: the font family of the label text.

          • Font Size: the font size of the label text.

      • Key Items: Click the Eye icon on the right to display the label text of the key items (points that respond to mouse events).

        • Text Style

          • Color: Modify the color of the major item label text. For more information, see color picker description.

          • Font Style: the font style of the key item label.

          • Font weight: the font weight of the highlight label text.

          • Font: the font family of the highlight label text.

          • Font Size: the font size of the key item label.

    • Element Style

      • Ordinary Item

        • Color: Modify the background color of common elements by referring to the color picker description.

        • Border Color: Modify the border color of common item elements. For more information, see color picker description.

        • Border Size: Click the + or-sign or enter a value to modify the border size of the normal element.

        • Border Style: the type of the stroke that you want to use for the border. The type can be Solid or Dotted. Default value: Solid.

        • Transparency: Click the + or-sign or enter a value to modify the transparency of normal elements. The value ranges from 0 to 1.

      • Major Items

        • Color: Modify the background color of the highlight element by referring to the color picker description.

        • Border Color: Modify the border color of the major item element. For more information, see color picker description.

        • Border Width: Click + or-, or enter a value manually to change the border thickness of the key element.

        • Border Style: the type of the border. Valid values: Solid and Dotted. Default value: Solid.

        • Transparency: Click the + or-sign or enter a value to modify the transparency of normal elements. Valid values: 0 to 1.

Data tab

image

Configuration field description

Column

Description

name

Used to configure the category of each point in the calendar chart, that is, the name of the point.

value

Used to configure the value of each point in the calendar chart.

s

(Optional) The series value, used in conjunction with the series configuration items in the Style panel.

Interaction tab

image

Description

Interaction

Description

When a data item is clicked

Select Enable to enable the widget interaction feature. The calendar heatmap component has an interactive configuration. When you click to select a data item, the callback value is returned. By default, the name and value fields in the data are returned. For more information, see Configure callback IDs.

When the legend is clicked

Select Enable to enable the widget interaction feature. The calendar heatmap component has interactive configuration. When a legend is clicked, the callback value is returned. By default, the selected field in the data is returned. For more information, see Configure callback IDs.

Configure interactions in Blueprint Editor

  1. In Canvas Editor, right-click a widget and select Export to Blueprint Editor.

  2. Click the 蓝图图标icon in the upper-left corner.

  3. In Blueprint Editor, click calendar heatmap in the Added Nodes pane. You can view the calendar heatmap parameters in the canvas, as shown in the following figure. image

    • Events

      Events

      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 more information about specific data examples, see the Data Response Result section of the Data tab in the right-side configuration panel of the canvas editor.

      When a data interface request fails

      The event that is returned when a data interface request fails (such as network problems or interface errors) and is processed by the filter. The event also throws the processed JSON data. For more information about specific data examples, see the Data Response Result section of the Data tab in the right-side configuration panel of the canvas editor.

      When a data item is clicked

      The event that is raised when the calendar heatmap point is clicked, along with the data item corresponding to that point.

      When the legend is clicked

      The event that is raised when the calendar heatmap legend is clicked, along with the data item corresponding to the legend.

    • action

      Action

      Description

      Request Data Interface

      This action is performed to request the server data again. The data sent by an upstream data processing node or layer node is used as a parameter. For example, calendar heatmap the API data source is https://api.test and the data transferred to the request data interface is { id: '1'}, the final request interface is https://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 more information about specific data examples, see the Data Response Result section of the Data tab in the right-side configuration panel of the canvas editor.

      Highlight

      The input data of the action is of the object type. The parameters include seriesName (series name), seriesIndex (series index), dataIndex (data index), and name (data name). Sample data:

      {  
          "seriesName": "",  
          "seriesIndex": 1,  
          "dataIndex": 1,  
          "name": ""
      }

      Unhighlight

      The input data of the action is of the object type. The parameters include seriesName (series name), seriesIndex (series index), dataIndex (data index), and name (data name). Sample data:

      {  
          "seriesName": "",  
          "seriesIndex": 1,  
          "dataIndex": 1,  
          "name": ""
      }

      Display dialog box

      The input data of the action is of the object type. The parameters include dataindex (data index), name (data name), x (x-axis position), and y (y-axis position). Sample data:

      { 
          "dataIndex": 1,  
          "name": "",  
          "x": 1,  
          "y": 1
      }

      Hide dialog box

      Hide dialog box, no parameters required.

      Legend control

      The input data of the action is of the object type. The parameters include type (legend action type) and name (legend name). Sample data:

      {  
          "type": "legendToggleSelect",  
          "name": ""
      }

      Update component configurations

      Style configurations of widgets are dynamically updated. In the Configuration panel, click Copy Configuration to Clipboard to obtain the configuration data of the component. After that, change the style field for the data processing node in Blueprint Editor.

      Display

      The following example shows the widget.

      return{
        "animationType": "",
        "animationDuration": 1000,
        "animationEasing": "linear"
      }

      Hide

      The following example shows the widget.

      return{
        "animationType": "",
        "animationDuration": 1000,
        "animationEasing": "linear"
      }

      Switch to the implicit state

      The following example shows whether to show or hide a widget.

      return {
        "animationIn": {
          "animationType": "",
          "animationDuration": 1000,
          "animationEasing": "linear"
        },
        "animationOut": {
          "animationType": "",
          "animationDuration": 1000,
          "animationEasing": "linear"
        }
      }

      Move

      Move a widget to a specified location. The following example shows the reference data.

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