apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.21k stars 19.6k forks source link

X轴空值匹配存在问题 #8283

Closed Ericdmb closed 4 years ago

Ericdmb commented 6 years ago

One-line summary [问题简述]

在series的type为line或bar的类型(其他类型未知)时,对x轴进行赋值,当x轴存在null值时,series中的data无法与x轴数据进行正确的映射。

Version & Environment [版本及环境]

Expected behaviour [期望结果]

series中[null,5]能够映射到‘’null‘’上,或者x轴的null不会被转换成‘null’并能与数据正确映射。 即线有单调性。

ECharts option [ECharts配置项]

option ={
    legend: {},
    tooltip: {},
    xAxis: {
        type: 'category',
        data:['A','B','C','D',null]
    },
    yAxis: {},
    series: [
        {
            type:'line',
            data:[['A',1],['B',2],['C',3],['D',4],[null,5]],
            encode:{
                x:0,
                y:1
            }
        },
    ]
};

Other comments [其他信息]

http://gallery.echartsjs.com/editor.html?c=xrJD2aPYTz&comment=0 这上面的案例是我建的,与提交的option差别在seies的数据我把C,D的顺序调换了一下

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.