No error thrown if invalid type provided, silently falls back to `scatter`
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 enter a type for a trace that is not supported in the package you have, Plotly simply falls back to scatter plot. This is incorrect, an error should be thrown to indicate the user entered an invalid type.
In my particular case, I had been using scattergl type with the full plotly.js-dist bundle, then when I switched our project over to plotly.js-finance (https://github.com/plotly/plotly.js/blob/master/dist/README.md#plotlyjs-finance) I thought everything was working correctly as all our test charts appeared correctly. However, I didn't notice plotly.js-finance did not include scattergl, so was in fact falling back to scatter, which had a significant performance penalty I did not notice while testing. I would have much appreciated an error indicating the type I was providing was not available in the partial bundle I was using.
I've made a code pen of the issue here, using a type "aninvalidtype": https://codepen.io/mofojed/pen/pojpVvP
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 usando "aninvalidtype" e confronta il comportamento tra il bundle completo plotly.js-dist e plotly.js-finance, soprattutto per il tipo scattergl non disponibile. Traccia come viene risolto il tipo di trace selezionato negli entry point del package. Il lavoro è concluso quando i tipi non supportati producono un errore invece di essere renderizzati silenziosamente come scatter, con copertura di regressione per i bundle parziali.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- data-visualization
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100