boxplots with q1/median/q3 signature always show fences as min/max on hover
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 18.3k
- Forks
- 2k
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 28
Beschreibung
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).
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der boxplot q1/median/q3-Signatur und reproduziere die Hover-Labels anhand des verknüpften CodePen-Beispiels. Prüfe, wie die Signatur fences und outliers darstellt, und bestimme anschließend, welches vorgeschlagene API-Verhalten angemessen ist; abgeschlossen bedeutet, dass Fence-Labels nicht länger min/max implizieren, wenn dies nicht bekannt sein kann, und dass das Verhalten des Beispiels durch Tests abgedeckt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100