Animations: let 'Play' button support different durations for different frames
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 18.8k
- Forks
- 2.8k
- Merge médio
- 16h 26min
- PRs com merge (30d)
- 21
Descrição
So far the button Play only support a single frame duration and a single transition duration for all the steps of the animation. It would be very useful to support different duration values at different frame step. Note that I haven't any way to define specific duration per frame, I am open to suggestions.
Current:
fig.update_layout(
updatemenus=[{
'type': 'buttons',
'buttons': [
{
'label': 'Play',
'method': 'animate',
'args': [None, {
'fromcurrent': True,
'frame': {'duration': 100, 'redraw': False},
'transition': {'duration': 100}
}]
}
]
}]
)
Possible alternative way to pass information:
fig.update_layout(
updatemenus=[{
'type': 'buttons',
'buttons': [
{
'label': 'Play',
'method': 'animate',
'args': [None, {
'fromcurrent': True,
'frame': [(str(i), {'duration': 100 if i%2 == 0 else 1000, 'redraw': False}) for i in range(len(frames))],
'transition': [(str(i), {'duration': 100 if i%2 == 0 else 1000}) for i in range(len(frames))]
}]
}
]
}]
)
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece pela configuração de animação passada por fig.update_layout, especialmente pelos botões de updatemenus que usam method animate e args. Rastreie como as durações de frame e transition são interpretadas e, em seguida, defina e teste uma forma de fazer Play usar valores por frame, preservando o formato atual de duração única.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- data-visualization
- Tipo de issue
- Funcionalidade
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Pouca atividade
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 48/100