Expand description
Instrument search and comparison dialogs
Provides symbol search with keyboard navigation and multi-symbol comparison functionality.
§Example - Instrument Search
use egui_charts::model::Instrument;
use egui_charts::ui::top_toolbar::SymbolSearchDialog;
let mut dialog = SymbolSearchDialog::new();
let symbols = vec![
Instrument::new("BTCUSDT").with_description("Bitcoin / Tether"),
Instrument::new("ETHUSDT").with_description("Ethereum / Tether"),
];
// In your egui update loop
if let Some(selected) = dialog.show(ctx, &symbols) {
println!("Selected: {}", selected.symbol);
}§Example - Compare Symbols
use egui_charts::model::Instrument;
use egui_charts::ui::top_toolbar::{CompareAction, CompareSymbolsDialog};
let mut compare = CompareSymbolsDialog::new();
compare.open();
// The symbols your data source offers
let symbols = vec![Instrument::new("ETHUSDT").with_description("Ethereum / Tether")];
match compare.show(ctx, &symbols) {
CompareAction::AddSymbol(sym, placement) => println!("Add: {sym} ({placement:?})"),
CompareAction::RemoveSymbol(sym) => println!("Remove: {}", sym),
_ => {}
}Structs§
- Compare
Symbol - Instrument information for comparison
- Compare
Symbols Config - Configuration for compare symbols dialog
- Compare
Symbols Dialog - Compare symbols dialog
- Symbol
Search Config - Configuration for symbol search dialog
- Symbol
Search Dialog - Instrument search dialog with keyboard navigation
Enums§
- Compare
Action - Action from compare symbols dialog
- Compare
Placement - Where a symbol added from the compare dialog goes.