boxplots with q1/median/q3 signature always show fences as min/max on hover
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 18.3k
- Fork
- 2k
- Merge medio
- 2g 12h
- PR unite (30g)
- 28
Descrizione
Like many who requested the boxplot with q1/median/q3 signature, I have a situation where I am pre-computing these statistics (along with lower and upper fence) from a very large database and then feeding these values to plotly.
I am also pre-computing outliers and adding those as a separate trace.
When using the boxplot with q1/median/q3 signature, we do not have the flexibility to label the fences correctly in the case of outliers.
See the example below (codepen):
Here there are no low outliers, so the lower fence is correctly labeled as "min" in the hover. However, the upper fence is labeled as "max" even though there are outliers.
This is confusing to users who wonder why something is labeled as the max when there are points outside of the fence. If I chose not to add the outliers trace, which is probably what most people do who are using this boxplot signature, it would be even more misleading because there would be no hint about whether the underlying data these fences were computed from really have min and max values at the fences, which could lead to some incorrect and bad conclusions about the data.
Fences are not necessarily the min and max, and when using the q1/median/q3 signature, the boxplot has no way of knowing which is the case.
This could be addressed with any of the following:
- Allow the ability to override the hover text for this signature
- Add an outliers argument to this signature as some have proposed here
- Add min/max to the signature – these wouldn't be plotted, but if min < lowerfence, then the hover text for lowerfence would be "lowerfence" (otherwise "min") and similar logic for upperfence/max
- Always make the hover text for the lower and upper fences as "lowerfence" and "upperfence" regardless of whether they represent the min/max
- Remove the boxplot with q1/median/q3 signature option because it produces a plot that currently by default has statistically incorrect hover info
Personally I lean toward (3).
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 con la firma boxplot q1/median/q3 e riproduci le etichette al passaggio del mouse usando l’esempio CodePen collegato. Esamina come la firma rappresenta fences e outliers, quindi determina quale comportamento API proposto sia appropriato; il lavoro è completato quando le etichette dei fence non implicano più min/max quando questo non può essere noto e il comportamento dell’esempio è coperto da test.
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
- 25/100