Legend size is calculated incorrectly with orientation 'v', yref 'container'
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 18.3k
- Fork
- 2k
- Merge medio
- 2g 12h
- PR unite (30g)
- 28
Descrizione
As mentioned in this PR comment (#7359), there appears to be a bug related to the legend size calculation (possible due to an incorrect margin calculation) when the orientation is set to v and the yref is set to container. You can see the issue by going through the following steps:
- Be on master
- Start up the developer dashboard
- Load the legend_horizontal_autowrap mock
- Note that it loads fine
- Edit the JSON for the mock to switch
"orientation"to"v" - Edit the JSON for the mock to add
"yref"with a value of"container"under the"legend"key - Reload the mock
- Note that the legend gets scrunched up into the top right corner of the plot
- Switch to this branch
- Reload the mock
- Note that an error is produced (due to a bad reaction to a negative margin value)
An example of the bug is seen in the following image:
The legend height should be calculated using the plot height (the "container"), but something is going wrong in this configuration.
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
Avvia il developer dashboard e carica il legend_horizontal_autowrap mock, quindi riproduci il problema impostando legend orientation su "v" e yref su "container". Traccia il calcolo delle dimensioni e del margine della legenda a partire da questa riproduzione. Il lavoro è completato quando la legenda usa la plot height come contenitore, non è compressa nell’angolo in alto a destra e si ricarica senza un negative-margin error.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- data-visualization
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100