Inconsistent `gap` attributes causes misalignment
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 18.3k
- Forks
- 2k
- Merge medio
- 2 d 12 h
- PR fusionados (30 d)
- 28
Descripción
If you provide both bargap and scattergap but they're different, traces in the same alignment and offset group do not properly align. One way or another, ensuring these traces align is more important than honoring both gaps. Here, the orange and green scatter points should be centered on the bars of the same color, but they are not:
https://codepen.io/alexcjohnson/pen/yLdEZvo?editors=0010
This is a little tricky though:
- If there are no bar traces,
bargapwill not be defined, soscattergapshould be honored. - Even if there are bar traces but only
scattergapis explicitly given, seems like it should be honored and used as thebargapvalue as well. - There are also
boxgapandviolingap- in principle you could have ALL of these traces in the same alignment and offset groups, do we define a hierarchy, something like bar beats scatter beats box beats violin? Or do we take the gap from the first trace in the group, and use that for all traces in that group? Or the maximum gap that applies to any trace in the group? I have no strong opinions here, so long as the result is always proper alignment. - All but scatter also have
*groupgapattributes. There's no problem allowing these to be different.
Guía de contribución
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
Comienza con el manejo de la alineación y los grupos de offset para los traces bar, scatter, box y violin, y reproduce la discrepancia usando el CodePen enlazado. Compara los casos con atributos gap ausentes o establecidos explícitamente y, después, establece una regla coherente para elegir el gap compartido, conservando la alineación correcta. El trabajo estará terminado cuando los traces de los mismos grupos estén centrados correctamente en todas las combinaciones de traces relevantes.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- data-visualization
- Tipo de issue
- Error
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100