Plot does not appear in some cases if rangebreaks overlap
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 18.3k
- Fork
- 2k
- Merge medio
- 2g 12h
- PR unite (30g)
- 28
Descrizione
I've created a Codepen for the issue: https://codepen.io/mofojed/pen/ZEgPJPN
In this case, the data spans a week, and range breaks are specified for a full holiday on Thursday, Nov 23, 2023 (Thanksgiving), and a half day on Friday, Nov 24, 2023. These specifications overlaps with other patterns for business days.
The chart does not appear. It looks like the rangebreaks that Plotly.js locates for the plot is:
Where some of those overlap. It looks like that isn't taken into account when calculating the breaks length, so when there's overlap it will not generate a valid break length: https://github.com/plotly/plotly.js/blob/29ca37b4ba3ee28a3ffe3d48eab97a080d602af3/src/plots/cartesian/autorange.js#L199
I think it would make sense to check for overlapping here. I'll see if it's possible to adjust holidays to not overlap with any existing business periods as well...
#5783 is similar
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 riproduzione CodePen collegata e ispeziona la gestione dei rangebreak intorno alla riga 199 di src/plots/cartesian/autorange.js. Confronta il comportamento con quello dell’issue simile #5783, quindi verifica che i grafici vengano renderizzati quando i rangebreak holiday e business-day si sovrappongono senza produrre una break length non valida.
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à
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 68/100