dash-core-components icon indicating copy to clipboard operation
dash-core-components copied to clipboard

animation_options in Graph has incorrect default value ("ease" instead of "easing")

Open slishak opened this issue 4 years ago • 0 comments

The defaultProps for animation_options are { frame: { redraw: false, }, transition: { duration: 750, ease: 'cubic-in-out', }, }, but Plotly.animate takes an "easing" argument, not "ease".

I don't see any warning in the console for this, so I don't think these arguments are being validated; I can put whatever I like in animation_options and never get warnings/errors.

As an aside, it would be helpful if the dash_core_components docs mentioned that frame.duration has to be set at least as long as transition.duration, or at least linked to https://plotly.com/javascript/animations/, as it's not immediately clear that you can't just arbitrarily set transition.duration to higher values. In fact the default frame.duration is 500, so the 750 default value here is misleading (maybe just setting frame.duration to 750 in the default here would at least highlight to users that it needs to be set).

slishak avatar Apr 08 '21 15:04 slishak