echarts 区域填充颜色重叠异常

db2dz4w8  于 5个月前  发布在  Echarts
关注(0)|答案(5)|浏览(49)

Version

4.8.0

Steps to reproduce

option = {
    xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['周一','周二','周三','周四','周五','周六','周日']
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        name: '成交',
        type: 'line',
        smooth: true,
        connectNulls: true,
        stack: "stack",
        areaStyle: {},
        data: [10, "-", "-", 710, "-", "-", 54]
    },
    {
        name: '预购',
        type: 'line',
        smooth: true,
        connectNulls: true,
        stack: "stack",
        areaStyle: {},
        data: [10, "-", "-", 710, "-", "-", 54]
    }]
};

What is expected?

重叠后应该只有两种颜色,而非三种

What is actually happening?

重叠后出现三种颜色

2j4z5cfb

2j4z5cfb1#

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org . Please attach the issue link if it's a technical questions.

If you are interested in the project, you may also subscribe our mail list .

Have a nice day! 🍵

kmbjn2e3

kmbjn2e32#

重现了Bug,看上去是在数据里有NaN时connectNull设置为true时的一个堆叠bug(累积线没有考虑null)
临时的解决方案是传入数据前把非数值数据转换成0(也不是很好的过渡)

hk8txs48

hk8txs483#

重现了Bug,看上去是在数据里有NaN时connectNull设置为true时的一个堆叠bug(累积线没有考虑null)
临时的解决方案是传入数据前把非数值数据转换成0(也不是很好的过渡)

转换成0确实不是好办法

mznpcxlj

mznpcxlj4#

重现了Bug,看上去是在数据里有NaN时connectNull设置为true时的一个堆叠bug(累积线没有考虑null)
临时的解决方案是传入数据前把非数值数据转换成0(也不是很好的过渡)

转换成0确实不是好办法

对的,不过在这个问题被修复之前目前想不出什么更好的临时方案了。如果你乐意为ECharts做出贡献,可以尝试自己修复这个Bug并通过PR提交给社区。

For community, please be kind to remove waiting-for tag and evaluate proper milestone & bug diffculty tag for this issue.

gmxoilav

gmxoilav5#

I am fixing this bug

相关问题