apache / echarts

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

[Feature] 饼图aniamtionDuration设置动画时长无效问题 #17016

Open userxiong opened 2 years ago

userxiong commented 2 years ago

What problem does this feature solve?

Using the timeline attribute to control the animation duration can make the playback look smooth

What does the proposed API look like?

var xAxisData = [];
var data1 = [];
var data2 = [];
for (var i = 0; i < 100; i++) {
  xAxisData.push('A' + i);
  data1.push((Math.sin(i / 5) * (i / 5 - 10) + i / 6) * 5);
  data2.push((Math.cos(i / 5) * (i / 5 - 10) + i / 6) * 5);
}
option = {
  title: {
    text: 'Bar Animation Delay'
  },
  legend: {
    data: ['bar', 'bar2']
  },
  toolbox: {
    // y: 'bottom',
    feature: {
      magicType: {
        type: ['stack']
      },
      dataView: {},
      saveAsImage: {
        pixelRatio: 2
      }
    }
  },
  tooltip: {},
  xAxis: {
    data: xAxisData,
    splitLine: {
      show: false
    }
  },
  yAxis: {},
  series: [
    {
      name: 'bar',
      type: 'pie',
      data: data1,
      emphasis: {
        focus: 'series'
      },

    },
    {
      name: 'bar2',
      type: 'bar',
      data: data2,
      emphasis: {
        focus: 'series'
      },

    }
  ],
  animationEasing: 'linear',

  animationDuration: 3000
};
echarts-bot[bot] commented 2 years ago

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

TRANSLATED
**TITLE** [Feature] Pie chart animetionDuration set animation duration invalid issue
mask2012 commented 1 year ago

yes, I have the same result, you can just open echarts.apache.org , select any pie chart demo, add animation:true, animationDuration: 1000*8, and you will find it has no effect.