RMI-PACTA / pacta.portfolio.report

pacta.portfolio.report
https://rmi-pacta.github.io/pacta.portfolio.report/
MIT License
1 stars 0 forks source link

animation of tech exposure is weird when bars are added #20

Open MonikaFu opened 1 year ago

MonikaFu commented 1 year ago

Issue transferred from issue #73 pacta.interactive.report

The animation of the tech exposure plot works very well when, for instance, switching between "as % of assets under management" and "as % of sector"... maintaining object constancy. However, once a selection causes a change in the number of bars being displayed, constancy is broken and a bunch of movement that doesn't make any sense occurs. I'm pretty certain this is because the ordering of elements changes when the animation is triggered on a new dataset, and I'm pretty sure this could be resolved by keying the data points.

To demonstrate, one can use the new prototype package r2dii.interactive. Notice the difference between the animations when you change the selection of the "as % of..." selector versus the asset type selector.