Legend size is calculated incorrectly with orientation 'v', yref 'container'
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ả
As mentioned in this PR comment (#7359), there appears to be a bug related to the legend size calculation (possible due to an incorrect margin calculation) when the orientation is set to v and the yref is set to container. You can see the issue by going through the following steps:
- Be on master
- Start up the developer dashboard
- Load the legend_horizontal_autowrap mock
- Note that it loads fine
- Edit the JSON for the mock to switch
"orientation"to"v" - Edit the JSON for the mock to add
"yref"with a value of"container"under the"legend"key - Reload the mock
- Note that the legend gets scrunched up into the top right corner of the plot
- Switch to this branch
- Reload the mock
- Note that an error is produced (due to a bad reaction to a negative margin value)
An example of the bug is seen in the following image:
The legend height should be calculated using the plot height (the "container"), but something is going wrong in this configuration.
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
Khởi động developer dashboard và tải legend_horizontal_autowrap mock, sau đó tái hiện vấn đề bằng cách đặt legend orientation thành "v" và yref thành "container". Truy vết việc tính kích thước và lề của chú giải từ lần tái hiện đó. Được xem là hoàn tất khi chú giải sử dụng plot height làm container, không bị ép vào góc trên bên phải và tải lại mà không có negative-margin error.
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ó
- 3/5
- Thời gian dự kiến
- 1-2 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
- 45/100