No error thrown if invalid type provided, silently falls back to `scatter`
Personne n'a encore pris cette issue.
- Langage dominant
- JavaScript
- Étoiles
- 18.3k
- Forks
- 2k
- Merge moyen
- 2 j 12 h
- PR mergées (30 j)
- 28
Description
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
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par la reproduction CodePen liée utilisant "aninvalidtype" et comparez le comportement entre le bundle complet plotly.js-dist et plotly.js-finance, en particulier pour le type scattergl indisponible. Suivez la manière dont le type de trace sélectionné est résolu dans les points d’entrée du package. Le travail est considéré comme terminé lorsque les types non pris en charge produisent une erreur au lieu d’être rendus silencieusement comme scatter, avec une couverture de régression pour les bundles partiels.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- data-visualization
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 38/100