echarts dataset 与 series 表现不一致

fquxozlt  于 2022-11-02  发布在  Echarts
关注(0)|答案(3)|浏览(318)

Version

5.0.2

Steps to reproduce

option = {
    legend: {},
    tooltip: {},
    dataset: {
        // 用 dimensions 指定了维度的顺序。直角坐标系中,
        // 默认把第一个维度Map到 X 轴上,第二个维度Map到 Y 轴上。
        // 如果不指定 dimensions,也可以通过指定 series.encode
        // 完成Map,参见后文。
        dimensions: ['product', '2015', '2016', '2017'],
        source: [
            {product: 'Walnut Brownie', '2015': 43.3, '2016': 85.8, '2017': 93.7},
            {product: 'Walnut Brownie', '2015': 83.1, '2016': 73.4, '2017': 55.1},
            {product: 'Walnut Brownie', '2015': 86.4, '2016': 65.2, '2017': 82.5},
            {product: 'Walnut Brownie', '2015': 72.4, '2016': 53.9, '2017': 39.1},
            {product: 'Walnut Brownie', '2015': 72.4, '2016': 53.9, '2017': 39.1}

        ]
    },
    xAxis: {type: 'category'},
    yAxis: {},
    series: [
        {type: 'line'},
        {type: 'line'},
        {type: 'line'}
    ]
};

What is expected?

product 在x轴出现5次

What is actually happening?

实际出现了一次
所有数据都堆叠在一起了

oyt4ldly

oyt4ldly1#

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 thatyou 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 question.

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

Have a nice day! 🍵

ffscu2ro

ffscu2ro2#

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

TRANSLATED

TITLE

dataset and series performance is inconsistent

BODY

Version

5.0.2

Steps to reproduce

option = {
legend: {},
tooltip: {},
dataset: {
// Use dimensions to specify the order of dimensions. In the rectangular coordinate system,
// By default, the first dimension is mapped to the X axis, and the second dimension is mapped to the Y axis.
// If you don’t specify dimensions, you can also specify series.encode
// Complete the mapping, see later.
dimensions: ['product', '2015', '2016', '2017'],
source: [
{product:'Walnut Brownie', '2015': 43.3, '2016': 85.8, '2017': 93.7},
{product:'Walnut Brownie', '2015': 83.1, '2016': 73.4, '2017': 55.1},
{product:'Walnut Brownie', '2015': 86.4, '2016': 65.2, '2017': 82.5},
{product:'Walnut Brownie', '2015': 72.4, '2016': 53.9, '2017': 39.1},
{product:'Walnut Brownie', '2015': 72.4, '2016': 53.9, '2017': 39.1}

]
},
xAxis: {type:'category'},
yAxis: {},
series: [
    {type:'line'},
    {type:'line'},
    {type:'line'}
]

};

What is expected?

product appears 5 times on the x-axis

What is actually happening?

Actually appeared once
All the data is stacked together

相关问题