All Products
Search
Document Center

DataV:instructions-of-color-mapper

Last Updated:Dec 02, 2024

The color mapper is used to configure the mapping between various colors and data values in a widget. It has more than ten built-in color templates and supports custom colors and color values to meet different customization requirements. This topic describes how to use a color mapper to map and match data to colors. In this example, the Vector Scatter Layer component of the Basic Flat Map 3.0 component is used.

Configure color mapping

When you configure the color of the scatter dots in the map subwidget, you can use the following two color configuration methods to adjust the color of the scatter dots.

  • Method 1: Click the imageicon to the left of the Scatter Color configuration items. When you click Enable Visual Mapping in the Hover state, use the color picker description. You do not need to be driven by data. You can simply customize the style and adjust the color of a single color. The color can be monochrome or gradient. image

  • Method 2: Click the imageicon on the left of the Scatter Color configuration items. When you click Disable Visual Mapping in the Hover state, use the color mapper. The mapping is driven by the scatter data. You can select multiple scatter colors. image

Color Mapper Function Description

Description

Remarks

Toggle configuration color mapping when panel collapses

When the color mapper is collapsed, click the color display bar to open the multi-color color template. The top row displays the current mapped color results, with multiple color templates available for you to choose from below. Click the color bar in the template to quickly switch the configuration mapping color. image

Panel expansion configuration mapping details

When the color mapper is in the expanded state, the system automatically reads data and maps the colors to the data. You can configure the mapping details as follows: image

  • Mapping Type: the mapping type of the color. You can select Noun Classification, Numeric Continuous, or Numeric Partition. For more information, see Color mapping.

  • Color Template: Click the color template bar to open a multi-color template. You can quickly change the color of the data mapping. After you select a color template, you can click a color in the color mapping list and modify the color based on the color picker description.

    Note

    Click the 钉住图标icon to the right of a color in the template to pin the color value of the selected color. A single color that is not pinned changes as the template is switched.

    钉住状态

  • Quantity: You can specify the number of color steps in the color template.

  • Reverse: Click the imageicon to sort the color mapping list in descending order.

  • Mapping of Abnormal Value Entries: Click the Color tab to define the mapping status of abnormal values such as undefined, null, and NaN. For more information, see Color mapping. 其他值颜色映射

  • Custom Mapping: If you turn on the switch, you can customize the mapping between data and colors and set the style of the mapping color to meet your requirements. image

    • Delete an Entire Row Map: Click the imageicon to the left of a row map to delete the entire row map color entries.

    • Set Mapping Field: You can enter a field value that corresponds to the specified color in the field on the right of a mapping entry. Depending on the color mapping type, you need to enter different text or numeric data field value content.

    • Add a mapping entry: Click the imageicon below the color mapping list to add a row of color mapping entries.

Note

The color mapper provides more than 10 built-in color templates. You can customize colors and color values to meet your custom requirements.

Color mapping classification

Color mapping types are classified into three types: Noun classification, numeric continuous, and numeric partition.

Type

Migration description

Noun classification

It is suitable for data that needs to be equally classified into names and categories to provide color differentiation. The colors on the swatches are more distinguishable from each other.

Noun Classification Color Template Style imageNoun Classification Data Example Figure image

Continuous values

This method is applicable to the case where a continuous gradient of colors is assigned to numeric data, and the values and colors are in one-to-one correspondence in the mapping space.

numeric continuous color template style imagenumeric continuous data example image

Numeric partition

This method is applicable to the case where consecutive values are partitioned based on continuous value mapping, data within the same value range is classified into one category, and the data within this range is filled with the same color. Using numeric partition mapping, you can reduce the number of colors and avoid visual clutter.

numeric partition color template style imagenumeric partition data sample graph image