You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/04/27 03:55:46 UTC

[GitHub] [incubator-echarts] softwords opened a new issue #12505: Enhanced animation when deleting items from chart

softwords opened a new issue #12505:
URL: https://github.com/apache/incubator-echarts/issues/12505


   ### What problem does this feature solve?
   The essence of the problem is support for what Mike Bostock calls "object constancy".
   See the example here: https://bost.ocks.org/mike/constancy/
   
   ECharts suppports "object constancy" by allowing you to name and series and a data point. When you merge a data point named in this way , ECharts looks for the graphic object currently in the chart that refers to this item. If such an object is found, ECharts uses it to represent the new data value. The animationDurationUpate, animationDelayUpdate, animationEasingUpdate properties control how the object morphs to its new shape and position. 
   If no existing object is found for the dataItem, then a new one is created. Its rendering is animated using animationDuration, animationDelay, animationEasing.
   This works great, as seen in this fiddle: http://jsfiddle.net/softwords/0h83jbdc/9/
   
   But, it's only two of the three things you need for a first-class implementation of object constancy.
   
   Compare the above with d3: in d3, when data is merged, the sets of new and existing data points are compared to determine which are Updates, which are New, and - crucially - which existing points are Deleted.
   What Echarts currently does not have is a way to act specifically on these deletions. 
   
   Currently in a bar chart, when a series is removed, all points in that series are quickly destroyed. The bars are narrowed in the y-direction until they are gone.
   Similarly, when a data item is removed from an existing series, it is narrowed in the y-direction during the period of the animationDurationUpdate, beginning at AnimationDelayUpdate. In other words, the deletions and the updates happen during the same time interval.
   
   To see this in the fiddle, select year 2006, then Iran from the dropdown. Change to year 2010, and watch the Iran bar disappear.
   
   ### What does the proposed API look like?
   
   For an even better animation, I suggest we need new series properties:
   - animationDurationDelete, 
   - animationDelayDelete, 
   - animationEasingDelete 
   
   to control how items are removed from the chart.
   
   I'd like to be able to do this:
   
   ```
   series: {
   ...
   	animation: true,
   	 animationDelayDelete: 0,
   	 animationDurationDelete: 500, 		// first remove the deleted items
   	 animationDelayUpdate: 500,
   	 animationDurationUpdate: 500, 		// then move/resize the items that are updated
   	 animationDelay: 1000,
   	 animationDuration: 500 		// add the new items
   }
   ```
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #12505: Enhanced animation when deleting items from chart

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #12505:
URL: https://github.com/apache/incubator-echarts/issues/12505#issuecomment-619699466


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical questions.
   
   If you are interested in the project, you may also subscribe our [mail list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] pissang commented on issue #12505: Enhanced animation when deleting items from chart

Posted by GitBox <gi...@apache.org>.
pissang commented on issue #12505:
URL: https://github.com/apache/incubator-echarts/issues/12505#issuecomment-619732145


   Hi @softwords. Thanks a lot for the very detailed scenario explanation.
   
   We are planning to improve animation in the next big release 5.0. I think it's a very promising feature to improve our leave animation.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org