Allow Auto-Bounds to Include or Exclude Specific Datasets
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- rust
調査の方向性
egui_plot の auto_bounds API から始め、プロットされた系列が現在どのように x/y の範囲に寄与しているかを、既存の include_x と include_y の動作を含めて追跡します。include フィルターと exclude フィルターで名前付きの系列をどのように識別するかを定義し、リセットして再適用する回避策を使わずに、リンクされたペインと滑らかな更新で auto-bounds を検証します。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 494
- フォーク
- 110
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
emilk/egui_plot のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
emilk/egui_plot の issue をすべて見る
似ている issue
-
claim
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Nixitov/Riptide-Native#946 ·
メンテナーはふだん 1 日以内に返信
-
area: ai-assistants documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
BetaBots-LLC/latticegate#17 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
storytold/craft-libs#5594 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
听歌识曲历史跳转后对应音源界面无法返回オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
LingyunStudio/RustMusic#16 ·