Skip to content

fix(line): line chart animation is not replayed when calling setOption twice #15581

@Ovilia

Description

@Ovilia

Version

5.1.2

Steps to reproduce

option = {
    xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        data: [820, 932, 901, 934, 1290, 1330, 1320],
        type: 'line',
        areaStyle: {}
    }],
    animationDuration: 5000,
    animationDurationUpdate: 5000
};

setTimeout(function() {
    myChart.setOption(option);
}, 1000);

What is expected?

Line animation is continued at the current position and play to the end.

What is actually happening?

Line animation is jumped to the end after 1 second.

Metadata

Metadata

Assignees

Labels

bugenThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.topic: line

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