-
Notifications
You must be signed in to change notification settings - Fork 19.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Pie expansion animation behavior #11029
feat: Pie expansion animation behavior #11029
Comments
Hi! We've received your issue and please be patient to get responded. 🎉 In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer. Have a nice day! 🍵 |
It's the difference between entry animation and transition animation.
I suggest you only set series when data is ready. |
@pissang I understand. However, This is a simulation of the issue. In my case I want to replace the whole data and the discrete animation looks odd. Is there a way to force the entry animation without recreating the whole series ? |
@MohammadYounes Sorry, currently the only way to use the first animation type is creating a new series like following // Every time data want to be replaced.
myChart.setOption({
series: {
// Use a different id to make sure this series is new created.
id: Date.now(),
// New data
data: ...,
// Other configs.
type: 'pie',
animationType:'expansion',
animationDuration:5000,
animationDurationUpdate:5000,
startAngle:0,
endAngle:360,
radius : ['50%','80%'],
center: ['40%', '50%']
}
// Second parameter of setOption should be set true so option will not be merged with previous
}, true); But it's a good idea to add a new config to specify the animation type. |
Version
4.2.1
Steps to reproduce
When loading Pie series along with data, the expansion animation is continues,
Code Sample:
But when setting the data while the series has already been added, the expansion animation becomes discrete (per pie piece).
Code Sample:
Is there away to force continues animation even if data is added later?
What is expected?
Continues Pie Chart Animation
What is actually happening?
Discrete Pie Chart Animation
The text was updated successfully, but these errors were encountered: