apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser

Home Page:https://echarts.apache.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] When the progress of gauge is displayed, the property "detail.color" behaves abnormally

comvir opened this issue · comments

Version

5.5.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?code=PYBwLglsB2AEC8sDeAoWsDOBTAThLGAXLANprrLnoBEYAniFtcdQOYCGArq0wDRWxqAWwjRmsAAz8KgoewAe4gEwTV0itQDGWaGFziyMmdQCsEgKTV1RwQHYTlgQF1rghRAwAZUU2KobNAA2PgDK9IG-lAFG1ADuEAAmYAAW4mau0VrAgcA4BgLRMoaFJRIAdADMGSUxAMQAggCi9RUAnBXUBTUuXSXFNQHlttUDNLUAYkoAwhX19Z2jFD2L6P0r6ACMI6PUtbYAQgAirfUmCytOvUaX0QC-29QYycCx4gBm7IHYAvcC1CDAUR6PJ-K6PZ6vYhgHCcLAPCCaGDif7sFKEAD06IAshslGUABy8IaBXG8AAs5Q2AAkhp5cQSiWVbAAvKxgiLQVgpZG4ywPeJJVLEFQPYBvN7YMBTHTA_IDKRXYwAWgAbBZzjZlgFqBA9EIwnQIuJ_DUsjkQW5OGBgBqjLcfq5qO4MAAVBEAa2NYKeL3en2wrl-xmdnnYACMsIEvZkfZDYB8vlgHX8MCBgmBvNBIiabODfcQEwHk8YQDhgKwcAQMNHtbHxNDYfzEtziOkwbqsPrwtnFRpEebkVxrbaZPbR46Eqj2HKAjnCtQAG6fWHiXFqXs0aDsISRaiAfb9AIXRbIGVzHSwnWDA7AgUdBMYh9ZhcLB_dyg6tNoebxgYBCEGZkRKGSDxLoEsL1NAEByJASJQk-oripK0q6PoxBrNECoDNQSoVA4I5LMWGiQGARp3rWD5wY2YJihKl7IbKaEbpI2zKhs6pXFq6BBhoqbpgAcpwQgRhaJiOjg7AJBAnDViwGwVOqjoYFeOBgBBrCkbAGz4phGg6AkakaTpNCdiAyTsBgHg1rmkkYOGEQJI-sKETQzIRAukarq4KBnpctwANxAA

Steps to Reproduce

chart option

option = {
  series: [
    {
    "type": "gauge",
    "min": 0,
    "max": 2000,
    "center": [
        "50%",
        "75%"
    ],
    "axisLine": {
        "lineStyle": {
            "width": 50,
            "color": [
                [
                    0.3,
                    "#AEA393"
                ],
                [
                    0.7,
                    "#F2C3AA"
                ],
                [
                    1,
                    "#7BD9A5"
                ]
            ]
        },
        "show": false
    },
    "pointer": {
        "show": true,
        "icon": "path://M12.8,0.7l12,40.1H0.7L12.8,0.7z",
        "length": "12%",
        "width": 20,
        "offsetCenter": [
            0,
            "-60%"
        ],
        "itemStyle": {
            "color": "auto"
        }
    },
    "axisTick": {
        "show": false,
    },
    "axisLabel": {
        "show": false
    },
    "splitLine": {
        "show": false,
    },
    "progress": {
        "show": true,
        "width": 50,
        "itemStyle": {
            "color": "auto"
        }
    },
    "data": [
        {
            "value": 1200,
            "name": "统计",
            
        }
    ],
    "detail": {
        "show": true,
        "color": "auto",
        "fontSize": 24,
        "valueAnimation": true,
        "offsetCenter": [
            0,
            "-35%"
        ]
    },
    "title": {
        "show": true,
        "offsetCenter": [
            0,
            "-10%"
        ],
    },
    "splitNumber": 5,
    "radius": "130%",
    "startAngle": 180,
    "endAngle": 0,
    "emphasis": {
        "disabled": true
    },
    "zlevel": 1,
    
}
  ]
};

Current Behavior

"detail.color='auto'" or "detail.color='inherit'" will not be valid when setting the property "progress.show=true"

Expected Behavior

The color of "detail" should be displayed as a numeric interval color.
the "numeric interval color" is from "axisLine.lineStyle.color"

Environment

- OS:any
- Browser:latest chrome
- Framework:any

Any additional comments?

No response

here is one way of having progress, pointer and detail with same color (if that's what you want)

here is one way of having progress, pointer and detail with same color (if that's what you want)

It's just a fixed color.
I want "detail.color" to change automatically with "axisLine.lineStyle.color". When "data.value" changes, its color will change.
So "detail.color" needs to be set to "inherit", but when "progress" is displayed, the setting does not work.

example:
see demo