boxplots with q1/median/q3 signature always show fences as min/max on hover
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 18.3k
- Fork
- 2k
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 28
Mô tả
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).
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với chữ ký boxplot q1/median/q3 và tái hiện các nhãn khi di chuột bằng ví dụ CodePen được liên kết. Xem xét cách chữ ký biểu diễn fences và outliers, sau đó xác định hành vi API được đề xuất nào là phù hợp; hoàn tất có nghĩa là các nhãn fence không còn ngụ ý min/max khi không thể biết được điều đó, và hành vi trong ví dụ được bao phủ bởi các test.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- data-visualization
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100