Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ECharts disable symbol (marker) animation only

Take a look at this simple demo project I grabbed from their site: https://ecomfe.github.io/echarts-examples/public/editor.html?c=dynamic-data2

Only thing I changed is the value of showSymbol. From false to true. So you can see the little dots on the line and how they slowly grow until they reach their final size. Since I can't save my own version of this demo you'll have to do so aswell to see what I mean.

There is a property called animation for series. This will in fact disable the grow animation, but will also disable all other animations connected with this series. For example the smooth transition to the left when new datapoints are added.

I don't want to hide the markers. I want them there, but without that animation.

Does anyone know of a way to achive this?

like image 796
M. Folte Avatar asked Oct 26 '25 04:10

M. Folte


1 Answers

    series: [{
        name: '模拟数据',
        type: 'line',
        showSymbol: true,
        hoverAnimation: false,
        data: data,
        animation: false
    }],
    animation: true

This can help disable the item animation while keeping animation of the X axis. But I'm afraid there's nothing more we can do with the line animation.

like image 149
Ovilia Avatar answered Oct 29 '25 06:10

Ovilia