Version
5.2.2
Link to Minimal Reproduction
https://echarts.apache.org/examples/en/editor.html?c=pie-simple&code=PYBwLglsB2AEC8sDeAoWsCG0IFsORgBEBXAJ3ymgC4BGABgboBpY1Ns8DoTyuBVEABN8AU1qNmbAM4jSEEVKqwA2m3Sp0m2NAw4xsAOQBBAMYmFU2ADFSwHAaZrNYAJ4h9BkPIdP05QRDEioYArHQApD5a6MJgGEqq0ZpIsABuGAA2xPr0ACwAHCw6ekoGAMoiGKQmABawAKLQAOYQ0CIGsAC-jknqaZnZSgDsAMwhRboehBCkIiZgHd2-yf1Z-iH5zNqTpfV4EBmLPb0p6WtKBbkTJYZ82DCwRoJSR8t9Z4OwIwzXHgBqEEEImAj2ei2WAF0nJ02FDOgBuIA
Steps to Reproduce
Specifying the animaitonDuration or animationDuration on option-level has no effect in PieCharts, wether it works in all other major chart types (Line, Bar ...)
No Effect:
option = {
animationDuration:10000, // Has no effect
animationDurationUpdate:10000, // Has no effect
series: [
{
name: 'Access From',
type: 'pie',
radius: '50%',
data: [
{ value: 1048, name: 'Search Engine' },
{ value: 735, name: 'Direct' },
{ value: 580, name: 'Email' },
{ value: 484, name: 'Union Ads' },
{ value: 300, name: 'Video Ads' }
]
}
]
};
Working alternative:
option = {
series: [
{
name: 'Access From',
type: 'pie',
radius: '50%',
data: [
{ value: 1048, name: 'Search Engine' },
{ value: 735, name: 'Direct' },
{ value: 580, name: 'Email' },
{ value: 484, name: 'Union Ads' },
{ value: 300, name: 'Video Ads' }
],
animationDuration:10000, // works
animationDurationUpdate:10000, // works
}
]
};
Current Behavior
The animationDurationand animationDurationUpdate defined on option-level is not applied, because it is overwritten with series-level default values specified here:
|
animationDuration: 1000, |
|
|
|
// Animation type when update. Valid values: transition, expansion |
|
animationTypeUpdate: 'transition', |
|
|
|
animationEasingUpdate: 'cubicInOut', |
|
animationDurationUpdate: 500, |
As far as I observed PieChart is the only chart type where such default values are defined 🤔 .
Expected Behavior
Specifying animationDuration and other animation-related parameters should be consistent across different chart types.
Both options should produce the same result:
Option 1:
option = {
animationDuration:10000, // Has no effect
animationDurationUpdate:10000, // Has no effect
series: [
{
name: 'Access From',
type: 'pie',
radius: '50%',
data: [
{ value: 1048, name: 'Search Engine' },
{ value: 735, name: 'Direct' },
{ value: 580, name: 'Email' },
{ value: 484, name: 'Union Ads' },
{ value: 300, name: 'Video Ads' }
]
}
]
};
Option 2:
option = {
series: [
{
name: 'Access From',
type: 'pie',
radius: '50%',
data: [
{ value: 1048, name: 'Search Engine' },
{ value: 735, name: 'Direct' },
{ value: 580, name: 'Email' },
{ value: 484, name: 'Union Ads' },
{ value: 300, name: 'Video Ads' }
],
animationDuration:10000, // works
animationDurationUpdate:10000, // works
}
]
};
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
No response
Version
5.2.2
Link to Minimal Reproduction
https://echarts.apache.org/examples/en/editor.html?c=pie-simple&code=PYBwLglsB2AEC8sDeAoWsCG0IFsORgBEBXAJ3ymgC4BGABgboBpY1Ns8DoTyuBVEABN8AU1qNmbAM4jSEEVKqwA2m3Sp0m2NAw4xsAOQBBAMYmFU2ADFSwHAaZrNYAJ4h9BkPIdP05QRDEioYArHQApD5a6MJgGEqq0ZpIsABuGAA2xPr0ACwAHCw6ekoGAMoiGKQmABawAKLQAOYQ0CIGsAC-jknqaZnZSgDsAMwhRboehBCkIiZgHd2-yf1Z-iH5zNqTpfV4EBmLPb0p6WtKBbkTJYZ82DCwRoJSR8t9Z4OwIwzXHgBqEEEImAj2ei2WAF0nJ02FDOgBuIA
Steps to Reproduce
Specifying the
animaitonDurationoranimationDurationon option-level has no effect in PieCharts, wether it works in all other major chart types (Line, Bar ...)No Effect:
Working alternative:
Current Behavior
The
animationDurationandanimationDurationUpdatedefined on option-level is not applied, because it is overwritten with series-level default values specified here:echarts/src/chart/pie/PieSeries.ts
Lines 318 to 324 in 11c5a12
As far as I observed PieChart is the only chart type where such default values are defined 🤔 .
Expected Behavior
Specifying
animationDurationand other animation-related parameters should be consistent across different chart types.Both options should produce the same result:
Option 1:
Option 2:
Environment
Any additional comments?
No response