Allow Auto-Bounds to Include or Exclude Specific Datasets
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
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- rust
- Lĩnh vực
- data-visualization
Hướng nghiên cứu
Bắt đầu từ API auto_bounds của egui_plot và theo dõi cách các chuỗi được vẽ hiện đóng góp vào các giới hạn x/y, bao gồm cả hành vi hiện có của include_x và include_y. Xác định cách các bộ lọc include và exclude sẽ nhận diện các chuỗi có tên, sau đó xác minh auto-bounds với các pane được liên kết và các cập nhật mượt mà mà không cần giải pháp tạm thời reset rồi áp dụng lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
I’m building a trading terminal using egui and egui_plot. Right now, auto_bounds considers all series when computing plot limits. I’d like to exclude certain datasets (for example, indicators) so that auto-bounds apply only to the primary data (e.g., candlesticks).
Describe the solution you'd like
Add an API to include or exclude named series when computing auto-bounds. For example:
plot
.auto_bounds([false, true])
.include(vec!["ohlc"])
// or
plot
.auto_bounds([false, true])
.exclude(vec!["bbu", "bbl"])
include(&[&str]): only these series affect auto_boundsexclude(&[&str]): all series except these affect auto_bounds
Describe alternatives you've considered
Currently, I disable auto-bounds entirely, track the plot’s visible bounds each frame, and then manually re-apply the desired x/y limits when there hasn’t been any interaction:
if !pane.interacting &&
(pane.needed_plot_bounds.min()[1] != pane.plot_bounds.min()[1]
|| pane.needed_plot_bounds.max()[1] != pane.plot_bounds.max()[1])
{
plot = plot.reset(); // because include_x and include_y only works once after reset
}
plot.auto_bounds([false, false])
.include_x(pane.needed_plot_bounds.min()[0])
.include_x(pane.needed_plot_bounds.max()[0])
.include_y(pane.needed_plot_bounds.min()[1])
.include_y(pane.needed_plot_bounds.max()[1])
.link_axis(LINK_GROUP_ID, Vec2b::new(true, false))
.link_cursor(LINK_GROUP_ID, Vec2b::new(true, false))
.show(ui, |plot_ui| {
// to update plot_bounds, needed_plot_bounds and interacting
pane.update_plot_bounds(plot_ui.plot_bounds());
});
This workaround incurs a noticeable “jump” whenever bounds update, resulting in a less smooth scrolling/zooming experience.
Additional context
- A built-in
include/excludefilter forauto_boundswould greatly simplify my code and preserve smooth interactions by avoiding the need to reset and reapply manual bounds every frame. set_plot_boundsworks smoothly when there is only one pane. However, when multiple panes are linked together, it fails to update bounds correctly, making the workaround unusable in a multi-pane layout.
- Ngôn ngữ chính
- Rust
- Star
- 494
- Fork
- 110
- 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
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc 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.
Issue khác của emilk/egui_plot
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 66/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Tất cả issue của emilk/egui_plot
Issue tương tự
-
claim
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Nixitov/Riptide-Native#946 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: ai-assistants documentation help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
BetaBots-LLC/latticegate#17 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 94/100
storytold/craft-libs#5594 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
听歌识曲历史跳转后对应音源界面无法返回Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
LingyunStudio/RustMusic#16 ·