Skip to content

incorrect continous color mapping on maps if min and max is same #13668

@dirslashls

Description

@dirslashls

Version

5.0.0

Steps to reproduce

Navigate to https://echarts.apache.org/examples/en/editor.html?c=map-usa

Change the visualMap and data options to the following and leave the rest as is.

  1. visualMap options
       visualMap: {
            left: 'right',
            min: 4822023,
            max: 4822023,
            inRange: {
                color: ['#313695', '#4575b4', '#74add1', '#abd9e9', '#e0f3f8', '#ffffbf', '#fee090', '#fdae61', '#f46d43', '#d73027', '#a50026']
            },
            text: ['High', 'Low'],           // 文本,默认为数值文本
            calculable: true
        },
  1. series data options
                data:[
                    {name: 'Alabama', value: 4822023},
                ]

What is expected?

Expect to see only the single state with data to have the color.

What is actually happening?

Entire map has the same color including the state with the data.


If I set the min and max to be different values, the coloring works fine. However, in my case the min/max are automatically calculated based on the data and if there is data for a single state, this happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenThis issue is in EnglishstaleInactive for a long time. Will be closed in 7 days.topic: visualMap

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions