plotly / plotly/plotly.js

add tooltip annotation feature

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

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

feature P3
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ả

Hi,

I would like to propose a tooltip feature.

When exploring data and presenting our findings, it is important to be able to interactively annotate data points. Most popular data analysis software allow to do that.

I wrote a code to introduce this functionality (found in this branch). The tooltip function can be activated by a new modebar button. It allows to add an annotation to every clicked point. By default, tooltips contain x and y coordinates. They can be customized to contain any additional data attached to the trace or points, which makes it a powerful tool for data exploration and presentation.

When a plot is created with editable: true, the tooltips can be dragged around for placement or deleted interactively. Their text can also be edited. To delete a tooltip, click on its text and delete it.

Tooltips can be customized with an optional tooltiptemplate (leverages existing hovertemplate code) and tooltip annotation options (leverages existing annotations code)
331887266-f7258b47-6eb2-4c3c-a3ce-f23899fe57e1
Live example

The JS version is already compatible with Dash when a figure is created with a dictionary passed to dcc.Graph (Dash demo) but not yet with Plotly.py

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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.

Hướng nghiên cứu

Bắt đầu với branch dev-tooltip được liên kết, README của branch đó và ví dụ trực tiếp, sau đó xem xét nút modebar được đề xuất cùng với hành vi hiện có của annotations và hovertemplate. Bản demo Dash nằm trong demo/dash/dash_app_with_tooltip.py. Công việc được xem là hoàn tất khi hành vi của các tooltip annotation, việc tùy chỉnh, chỉnh sửa, kéo và xóa chúng hoạt động như mô tả và vẫn tương thích với cách sử dụng plotly.js hiện có.

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
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

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.