plotly / plotly/react-plotly.js
Issue with axis autorange: state self-mutates 'reversed' -> true
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 1.1k
- Forks
- 138
- Merge medio
- 3 d 2 h
- PR fusionados (30 d)
- 4
Descripción
As far as I understand, Plotly's axis reversal works by setting autorange to a string value of 'reversed' (with the other options being true for non-reversed autorange, and false for no autorange). After setting this, Plotly will autoscale the axis with range[0] and range[1] of the axis swapped.
The problem is, it seems like after setting autorange -> 'reversed', react-plotly mutates autorange back to true after doing the range reversal. So, there is no way to un-reverse the autorange without setting it first to false, then true.
What I think should happen:
Step 1: autorange true -> 'reversed'
Step 2: autorange 'reversed' -> true //can toggle axis reversal
What actually happens:
Step 1: autorange true -> 'reversed' -> true //last step being done automatically by react-plotly
Step 2: autorange true -> true //doesn't toggle axis reversal b/c no state change
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Reproduce las dos transiciones de autorange descritas en el issue, centrándote en cómo el componente React gestiona el estado del eje de Plotly. Se considera terminado cuando cambiar true a 'reversed' conserva ese valor, de modo que un cambio posterior de vuelta a true alterna la inversión sin un false intermedio.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, react
- Área
- data-visualization, frontend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100