Inconsistent `gap` attributes causes misalignment
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 18.3k
- Fork
- 2k
- Merge medio
- 2g 12h
- PR unite (30g)
- 28
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dalla gestione dell’allineamento e dei gruppi di offset per le trace bar, scatter, box e violin, e riproduci la discrepanza usando il CodePen collegato. Confronta i casi con attributi gap mancanti o impostati esplicitamente, quindi stabilisci una regola coerente per scegliere il gap condiviso mantenendo il corretto allineamento. Il lavoro è completato quando le trace negli stessi gruppi sono centrate correttamente in tutte le combinazioni di trace rilevanti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- data-visualization
- Tipo di issue
- Bug
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100