plotly / plotly/plotly.js

Scroll zoom does not work properly when minimum and maximum range is enabled

Aberta
#7,440 2 comentários 3 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

Scroll zoom does not work as expected when minimum and maximum range is enabled. Graphical side effects are constantly visible while zooming in/out.

See the provided example of the scatter plot chart:

  • Scrolling zoom (mouse wheel) is enabled (with scrollZoom property).
  • Minimum and maximum range is set (with minallowed and maxallowed properties).
  • (The grids and axes are visualised for better understanding the issue.)

https://codepen.io/zabka5/full/XJbYrZV

Use the mouse wheel to zoom out beyond allowed range.
The plotted trace is zoomed out even beyond the range. After a while, the plotting is "corrected" to the right zoom level. The effect is stronger if you zoom out faster. What is interesting, the axes and the grids are always scaled correctly. It means that plotting of the grid lines is always aware of the range limits but plotting the trace not.

The same effect can be reproduced while zooming IN relatively fast, even if the plot is "in the range". Then, the plotted trace exceeds the area defined by the X and Y axes and then i.e. the bigger than expected, but after a while, plotting is corrected. With this attached example, it is hard to observe this scenario. (Maybe bigger amount of data or slowness of the refreshing of the plot plays a role - with my custom environment, I can see it constantly).

The observed flickering is very annoying and shows a serious weakness in this function.

I have checked the different versions of the plotly library. The issue is easy to reproduce from the very first version introducing the minimum and maximum range, i.e. version v2.26.0 #6547

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 fornecida no CodePen e a implementação do intervalo mínimo/máximo introduzida em v2.26.0 (#6547). Compare a renderização do trace com os eixos e as grades corretamente dimensionados durante eventos rápidos de scroll-zoom. O trabalho estará concluído quando o trace permanecer dentro do intervalo permitido sem piscar nem precisar de correção posterior.

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
Ativa
Clareza
Razoavelmente clara
Facilidade para iniciantes
52/100

Receba novas issues na sua caixa de entrada

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