plotly / plotly/plotly.js

Errorbars on scatter plots don't react to point selection

Đang mở
#7,305 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

bug good for agent
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ả

If you make a plot with errorbars, they aren't affected at all by selections. This both looks weird (like part of your point was left behind when it became deselected) and can cause usability problems, in that it's harder to distinguish selected and unselected points, particularly if the points themselves are small.

The simple solution here would be to include the errorbars in the group that responds to marker.opacity. That also seems the most correct, as you shouldn't see an errorbar through a partially transparent marker, and intuitively I'd expect errorbars to become transparent along with their associated markers. I think that would cover most use cases, though including some errorbar attributes like color and thickness in the selected and unselected styles would also be nice.

A tricky bit here is that normally errorbars are drawn behind lines but markers are in front of lines, so they can't just be combined with the markers. I suspect the right solution is to only put them behind the lines when there are no markers, but when there are markers bring them up to just behind and grouped with each marker.

Relatedly, no errorbar attributes other than array and arrayminus accept arrays. Enabling color in particular to be an array would be useful, and could mostly work around the main issue here in some cases, though I wouldn't call it a full solution.

https://codepen.io/alexcjohnson/pen/RNbGamp?editors=0010
Image

To be clear: I don't think we should select the errorbars themselves - just select the points and bring the errorbars along for the ride.

Interestingly, errorbars on bar charts already behave correctly:

Image

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với bản tái hiện CodePen được liên kết và kiểm tra cách các thanh lỗi của biểu đồ phân tán được kết xuất tương quan với các điểm đánh dấu và đường khi chọn điểm. So sánh hành vi của chúng với các thanh lỗi trên biểu đồ cột, sau đó xác minh rằng việc chọn các điểm cũng thay đổi các thanh lỗi liên quan mà không chọn riêng các thanh lỗi.

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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.