aspectmode=data is incorrect when cones and scatter points are both involved
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ả
See https://codepen.io/alexcjohnson/pen/ExBryzb?editors=0010
When all traces in this plot are shown, the square is not square:
But if you click the legend to hide the cone trace, you do get a square:
This is a pretty important bug for anyone making a plot representing real 3D space, as shapes will be distorted and the only workaround I could find is to abandon axis autorange: set explicit ranges for all three axes, set aspectmode: 'manual', and calculate aspectratio.{x, y, z} explicitly.
I haven't been able to reproduce this issue with only scatter3d traces, nor have I tried with other trace types or with just cones, but my guess is we're calculating the axis aspect ratios before adding extra padding to the ranges to accommodate the cones. Ironically it appears we don't pad the axes (not at all? not very much? I can't quite tell) for scatter3d points, but that's a separate issue.
As a side note: it would be nice if aspectratio or aspectmode docs stated that aspectratio is ignored when you set aspectmode: 'data'. I've seen users try to use this combination of attributes to create vertical exaggeration of topography, but this fails (and again, the only solution I can find is to calculate everything manually).
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 bản tái hiện CodePen được liên kết và theo dõi cách 3D aspectmode:'data' xử lý các khoảng của trục khi cả hai trace cone và scatter3d đều hiển thị. So sánh kết quả với trường hợp ẩn cone; được xem là hoàn tất khi hình vuông vẫn là hình vuông với cả hai trace được hiển thị và tài liệu về aspectratio/aspectmode giải thích giới hạn được nêu.
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
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100