Skip to content

[Bug] 热力图Y轴渲染错误 #20634

Open

Description

@MIEnchating

Version

5.6.0

Link to Minimal Reproduction

No response

Steps to Reproduce

export const getHeatOptions = (): E.EChartsOption => {
    return {
        tooltip: {
            position: 'top',
        },
        grid: {
            top: "1%",
            bottom: "10%",
            left: "1%",
            right: "1%",
            containLabel: true
        },
        xAxis: {
            type: 'category',
            data: hours as any,
            axisTick: {
                lineStyle: {
                    color: '#fff'
                }
            },
            axisLabel: {
                color: '#fff',
            },
            splitArea: {
                show: true,
                areaStyle: {
                    color: ['rgba(44,60,77,.8)', 'rgba(35,47,68,.7)']
                }
            }
        },
        yAxis: {
            type: 'category',
            data: [],
            axisTick: {
                show: true,
                lineStyle: {
                    color: '#fff'
                }
            },
            axisLabel: {
                color: '#fff'
            },
            splitArea: {
                show: true,
                areaStyle: {
                    color: ['rgba(44,60,77,.8)', 'rgba(35,47,68,.7)']
                }
            }
        },
        visualMap: {
            min: 0,
            max: 3600,
            calculable: true,
            orient: 'horizontal',
            left: 'center',
            textStyle: {
                color: '#fff'
            },
            inRange: {
                color: ['#313695', '#4575b4', '#74add1', '#abd9e9', '#e0f3f8', '#ffffbf', '#fee090', '#fdae61', '#f46d43', '#d73027', '#a50026']
            }
        },
        series: {
            type: 'heatmap',
            data: [],
            label: {
                show: true
            },
            emphasis: {
                itemStyle: {
                    shadowBlur: 10,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            }
        }
    }
}

Current Behavior

左上角渲染错误

image

排除发现去的Y轴配置项splitArea的显示也可以正常显示,或者数据项在某些情况下也正常。如图:

1735637338747

Expected Behavior

正常渲染

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Activity

  1. added
    pending
    on Dec 31, 2024
  2. echarts-bot commented on Dec 31, 2024

    @echarts-bot

    @MIEnchating It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

    TRANSLATED

    TITLE

    [Bug] Heatmap Y-axis rendering error

  3. wyptaotao commented on Feb 14, 2025

    @wyptaotao

    同样遇到这个问题,只有x轴y轴两个splitArea均为true才会这样
    目前找到两个解决方案:

    1. 修改渲染器为svg,但是渲染压力可能大一些
    2. 将其中一个的areaStyle设置opacity: 0.99,这个改动比较小,而且视觉效果几乎没区别
  4. MIEnchating commented on Feb 14, 2025

    @MIEnchating
    Author

    同样遇到这个问题,只有x轴y轴两个splitArea均为true才会这样 目前找到两个解决方案:

    1. 修改渲染器为svg,但是渲染压力可能大一些
    2. 将其中一个的areaStyle设置opacity: 0.99,这个改动比较小,而且视觉效果几乎没区别

    感谢,实践是可以的,当前版本不需要opacity: 0.99,直接设置渲染器为svg就可以解决了

  5. wyptaotao commented on Feb 14, 2025

    @wyptaotao

    同样遇到这个问题,只有x轴y轴两个splitArea均为true才会这样 目前找到两个解决方案:

    1. 修改渲染器为svg,但是渲染压力可能大一些
    2. 将其中一个的areaStyle设置opacity: 0.99,这个改动比较小,而且视觉效果几乎没区别

    感谢,实践是可以的,当前版本不需要opacity: 0.99,直接设置渲染器为svg就可以解决了

    是,我的意思是两个方案二选一
    svg渲染器的压力比canvas是要大一些的,我最后还是用了2

  6. MIEnchating commented on Feb 14, 2025

    @MIEnchating
    Author

    同样遇到这个问题,只有x轴y轴两个splitArea均为true才会这样 目前找到两个解决方案:

    1. 修改渲染器为svg,但是渲染压力可能大一些
    2. 将其中一个的areaStyle设置opacity: 0.99,这个改动比较小,而且视觉效果几乎没区别

    感谢,实践是可以的,当前版本不需要opacity: 0.99,直接设置渲染器为svg就可以解决了

    是,我的意思是两个方案二选一 svg渲染器的压力比canvas是要大一些的,我最后还是用了2

    哈哈哈,不要有性能焦虑,现在电脑的性能肯定是妥妥的,svg如果你数据量不大是可以的
    老电脑可能要注意一下,还是看业务场景

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpending

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions