Skip to content
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

Add animation helper to be used with the styles #675

Open
elenatorro opened this issue Jan 24, 2020 · 0 comments
Open

Add animation helper to be used with the styles #675

elenatorro opened this issue Jan 24, 2020 · 0 comments

Comments

@elenatorro
Copy link
Contributor

Problem
When animating a visualization in a style helper by using the animated parameter, we lose control of the animation and we can't set the following settings:

  • duration
  • fade
  • hold

Proposed solution
Add an animation helper

from cartoframes.viz import Map, Layer, color_continuous_style, animation_settings

Map(
    Layer(
        'table_name',
        color_continuous_style('column_name'),
        animated=animation_settings('animated_column_name', fade_in=1, fade_out='hold')
    )
)

This can be combined with the current animated parameter, or leave the animated parameter as it is right now and add a new animation parameter instead

Map(
    Layer(
        'table_name',
        color_continuous_style('column_name'),
        animation=animation_settings('animated_column_name', fade_in=1, fade_out='hold'),
        animated=True
    )
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant