iayork opened a new issue #9592: Applying animation while updating series loses settings, reverts to defaults URL: https://github.com/apache/incubator-echarts/issues/9592 [x] I am using English in this issue. ## General Questions - [x] Required: I have read the document and examples and tried to solve it by myself. - [x] Required: I have searched for similar issues and that didn't help. - [x] Required: I have tried with the latest version of ECharts and still have this problem. In this issue, I have provided information with: - [x] Required: issue type; - [x] Required: one sentence description in issue details; - [x] Required: demo; - [x] Required: ECharts version <!-- END OF REQUIRED FIELDS 必填项结束 --> ## Issue Type - [ ] I have a question to ask about *how to use ECharts to ...*; - [x] I have a bug to report; - [ ] I have a feature to request, e.g.: *I'd like a new feature that ...*; - [ ] I have a feature to enhance, e.g.: *The current feature should be improved in the way that ...*; - [ ] There's something wrong with the documents; - [ ] Others, or I'm not sure which issue types to choose here; ## Issue Details Applying animation while updating series loses settings, reverts to defaults ### Expected Behavior Call a scatterplot with normal options, using animation settings `animationDelay: function(idx) { return idx * 250; }, animationEasingUpdate: "linear"` First series follows these animation options. Now update the "series" in the options with a different dataset but the same animation options. Expected behavior is that the new series will animate just like the first ### Current Behavior New series revert to the default animation setting and it isn't possible to modify their animation ### Online Example https://stackoverflow.com/questions/53793755/repeated-animations-with-echarts ` var chartOptions = function(seriesData) { let option = { xAxis: { min: 0, max: 11 }, yAxis: { min: 0, max: 11 }, series: [{ name: "Series 1", type: 'scatter', data: seriesData, color: "red", animationDelay: function(idx) { return idx * 250; }, animationEasingUpdate: "linear" }, ] }; return option; }; var nextSeries = function(seriesData) { let series = { series: [{ name: "Next series", type: 'scatter', data: seriesData, color: "blue", animationDelay: function(idx) { return idx * 250; }, animationEasingUpdate: "linear" }, ] }; return series; }; var series1 = [ [1, 1], [2, 2], [3, 3], [4, 4], [5, 5] ]; var series2 = [ [10, 10], [9, 9], [8, 8], [7, 7], [6, 6] ]; var series3 = [ [10, 10], [1, 1], [8, 8], [2, 2], [6, 6] ]; var seriesAll = [series1, series2, series3] var options = chartOptions(series1); var chart1 = echarts.init(document.getElementById("ChartView")); chart1.setOption(options); var i = 0; var timer = setInterval(function() { i++; if (i >= seriesAll.length) { clearInterval(timer) } else { var nextOptions = nextSeries(seriesAll[i]) chart1.setOption(nextOptions); }; }, 2000); ` ## Topics Check those topics that are related. - [ ] Legend - [ ] Tooltip - [ ] Event - [ ] Performance - [ ] SVG - [ ] Map - [ ] ECharts GL - [ ] Third-party libraries, e.g.: Vue.js, React ## Anything Else We Need to Know NA ## Environment - ECharts version;4.1.0 (https://cdnjs.cloudflare.com/ajax/libs/echarts/4.1.0/echarts-en.js) - [ ] It happens only on certain browsers or operating systems.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
