Skip to content

dataset 与 series 表现不一致 #14367

@anjing0524

Description

@anjing0524

Version

5.0.2

Steps to reproduce

option = {
    legend: {},
    tooltip: {},
    dataset: {
        // 用 dimensions 指定了维度的顺序。直角坐标系中,
        // 默认把第一个维度映射到 X 轴上,第二个维度映射到 Y 轴上。
        // 如果不指定 dimensions,也可以通过指定 series.encode
        // 完成映射,参见后文。
        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?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpendingWe are not sure about whether this is a bug/new feature.staleInactive for a long time. Will be closed in 7 days.waiting-for: community

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions