Inconsistent `gap` attributes causes misalignment
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ả
If you provide both bargap and scattergap but they're different, traces in the same alignment and offset group do not properly align. One way or another, ensuring these traces align is more important than honoring both gaps. Here, the orange and green scatter points should be centered on the bars of the same color, but they are not:
https://codepen.io/alexcjohnson/pen/yLdEZvo?editors=0010
This is a little tricky though:
- If there are no bar traces,
bargapwill not be defined, soscattergapshould be honored. - Even if there are bar traces but only
scattergapis explicitly given, seems like it should be honored and used as thebargapvalue as well. - There are also
boxgapandviolingap- in principle you could have ALL of these traces in the same alignment and offset groups, do we define a hierarchy, something like bar beats scatter beats box beats violin? Or do we take the gap from the first trace in the group, and use that for all traces in that group? Or the maximum gap that applies to any trace in the group? I have no strong opinions here, so long as the result is always proper alignment. - All but scatter also have
*groupgapattributes. There's no problem allowing these to be different.
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 việc xử lý căn chỉnh và các nhóm offset cho các trace bar, scatter, box và violin, đồng thời tái hiện sự không khớp bằng CodePen được liên kết. So sánh các trường hợp thiếu thuộc tính gap hoặc thuộc tính gap được đặt rõ ràng, sau đó thiết lập một quy tắc nhất quán để chọn gap dùng chung mà vẫn bảo toàn căn chỉnh chính xác. Hoàn thành khi các trace trong cùng nhóm được căn giữa chính xác trên tất cả các tổ hợp trace liên quan.
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
- 35/100