Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Offset for tips

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

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Lĩnh vực
data-visualization

Hướng nghiên cứu

Issue không nêu tên tệp hoặc test nào. Hãy bắt đầu bằng cách lần theo việc định vị tooltip và cách xử lý anchor, dx và dy; hoàn thành nghĩa là hỗ trợ một offset động vẫn chính xác khi anchor của tooltip thay đổi, với coverage cho chuyển động theo từng hướng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

By default, Plot positions tooltips automatically, changing the anchor so that the tooltip always remains within the canvas.

The tooltip is always positioned in the center of the element it is attached to.
In some cases, it is desired that the position of the tooltip has an offset. However, because the anchor is changing depending where the tooltip is rendered, offset values dy and dx can't be used statically, as this value would need to be positive, negative or 0 depending on the anchor position.

The example below illustrates how the tooltip is overlapping the text of a data point.
In some cases the tooltip would need to be moved up/down or left / right.

An additional parameter dOffset would be handy for dynamic positioning.

The parameters anchor and dy/dx can't be functions, therefor it is impossible to adjust these values at the moment.

image

Ngôn ngữ chính
HTML
Star
5.4k
Fork
250
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

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.

Issue khác của observablehq/plot

Tất cả issue của observablehq/plot

Issue tương tự

Thêm issue về Data Visualization

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.