plotly / plotly/plotly.js

Single-point or empty trace is not updated with slider

Aberta
#7,293 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

bug P3
Linguagem predominante
JavaScript
Estrelas
18.3k
Forks
2k
Merge médio
2d 12h
PRs com merge (30d)
28

Descrição

I'm trying to create a plot with a slider that will change all the traces. I have started with the example on the plotly page here and I have created a code pen to show a few problems I have noticed:

  • If I don't have originally the same number of traces (that is, if line 10 is commented), then new traces are not added on the other steps/frames - even though I'm adding them to the "data" object, which I believe should be completely updated.
  • Even when I have now the same number of traces, if one of them has a single point (lines 90/91) or is empty, then the trace is not updated completely: in the code pen example, moving to green will add the second line trace, then going back to red will move the point but the green line is stuck there. For graphs with at least 2 points (for example, changing the lines 90/91 to at least 2 points (e.g. x:[2,3], y:[1,1],)) the issue is not present.

I believe the data object is not being updated completely, which is something I'd have expected it to do.

PS: I have noticed similar problems with sliders without the "animate", although the objects seem - strangely - to be different (for example, in this codepen I have to pass arguments as x: [[1, 2, 3]], y: [[2, 1, 3]], in args to update more than one trace, but the issue of having to have at least one trace and traces not updating are also there.

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece reproduzindo os casos de slider e animação no exemplo do Plotly e nos CodePens vinculados, incluindo diferentes quantidades de traces e traces de um único ponto ou vazios. Rastreie como as atualizações do slider e os frames animados aplicam o objeto de dados; o trabalho estará concluído quando todos os traces, incluindo os adicionados, de um único ponto e vazios, refletirem corretamente cada etapa selecionada.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
javascript
Domínio
data-visualization
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
45/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.