How to define a custom on_hover behavior for a BarChart - is it really needed to re-implement all of PlotItem?

オープン
#106 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
rust
領域
frontend

調査の方向性

まず BarChart のホバー処理と content_formatter のパスを読み、次に非公開の items モジュールにある PlotItem とアクセスできない PlotItemBase を調べます。読みやすいホバー Box に必要なパブリックな拡張ポイントを定義し、利用可能であれば既存の plotting 例またはテストで動作を確認します。

索引モデルが issue の本文から書いたものです。

説明

Currently it only seems possible to provide a custom String to content_formatter to change
what is written when hovering over a bar. But depending on the graph this is often not very well readable.

I'd much rather display a small Box similar to the legend to give more info about the current Bar in the BarChart.

I'm kind of pulling my hair out on this one and have not found a proper solution.

EDIT: A special problem seems to be that I cannot even re-implement PlotItem because for base and mut_base methods to be implemented, I need to use the Type PlotItemBase whcih is inaccesible as the items module is private. I am really stuck here :(
And that is even more frustrating because they are just returning the same as the original implementation anyway. I don't want to do anything special there...

主要言語
Rust
スター
494
フォーク
110
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

emilk/egui_plot のほかの issue

emilk/egui_plot の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。