add argument to modify hover box position/direction
Đang mở
Chưa có ai nhận issue này.
cs
feature
P2
- 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ả
Right now developers can't modify the hover box position respective to the point the user is hovering. The hover box position is determined by:
- The numbers in the
"transform=translate(valuex, valuey)"argument of thegelement withclassName="hovertext": https://github.com/plotly/plotly.js/blob/master/src/components/fx/hover.js#L1200 - The shape specified in
din thepathelement (for the triangle orientation): https://github.com/plotly/plotly.js/issues/7278
https://github.com/user-attachments/assets/0634d079-b4eb-4325-af67-d13ac0fc6ba1
Desired behavior:
- Some argument like dcc.Tooltip
direction: https://dash.plotly.com/dash-core-components/tooltip#tooltip-properties - It should also allow diagonal/combined positions ("bottom+right")
# the python way
fig.update_traces(hoverbox_direction="right")
fig.update_traces(hoverbox_direction="left+top")
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 trong src/components/fx/hover.js, xung quanh phần tử g có className="hovertext" và transform của nó, sau đó xem xét issue #7278 về hướng của tam giác hover. Xác định cách một đối số hướng sẽ ánh xạ tới hộp hover và tam giác, bao gồm các hướng kết hợp như "left+top"; hoàn tất khi các caller có thể chọn những vị trí này thông qua cấu hình trace được yêu cầ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, frontend
- Loại issue
- Tính năng
- Độ 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