plotly / plotly/plotly.js

Colorbar Orientation Change Causes Render Issue

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

Ninguém assumiu esta issue ainda.

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

Descrição

Hello,

I was adding a control to one of my graphs in order to change the colorbar orientation from 'v' to 'h' and back again (user discretion) and noticed that it was having some strange behaviors.

Basically, it renders very strangely on change -- leaving the labels from the previous orientation and skewing things.

I did find that if I turn off the colorbar after changing orientation and turn it back on that it renders correctly.

So, I have created a workaround that onchange of orientation I hide the colorbar, do a plotly.react, then trigger a show of the colorbar and a second plotly.react.

I have demonstrated this in the following codepen: https://codepen.io/dritchie/pen/NWmOrZL

I commented out the 'fix', so both the weird behaviors and the correction can be shown.

Thanks!

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 com a reprodução vinculada no CodePen e inspecione as chamadas de plotly.react que alteram a colorbar orientation entre 'v' e 'h'. Confirme o comportamento com a colorbar habilitada e, em seguida, verifique se alterar a orientation renderiza sem rótulos da orientation anterior ou um layout distorcido, sem o workaround de hide-and-show.

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
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

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