pub struct ChartModal {Show 39 fields
pub active: bool,
pub chart_kind: ChartKind,
pub chart_type: ChartType,
pub x_column: Option<String>,
pub y_columns: Vec<String>,
pub y_starts_at_zero: bool,
pub log_scale: bool,
pub show_legend: bool,
pub focus: ChartFocus,
pub x_input: TextInput,
pub y_input: TextInput,
pub x_list_state: ListState,
pub y_list_state: ListState,
pub x_candidates: Vec<String>,
pub y_candidates: Vec<String>,
pub hist_column: Option<String>,
pub hist_bins: usize,
pub hist_input: TextInput,
pub hist_list_state: ListState,
pub hist_candidates: Vec<String>,
pub box_column: Option<String>,
pub box_input: TextInput,
pub box_list_state: ListState,
pub box_candidates: Vec<String>,
pub kde_column: Option<String>,
pub kde_bandwidth_factor: f64,
pub kde_input: TextInput,
pub kde_list_state: ListState,
pub kde_candidates: Vec<String>,
pub heatmap_x_column: Option<String>,
pub heatmap_y_column: Option<String>,
pub heatmap_bins: usize,
pub heatmap_x_input: TextInput,
pub heatmap_y_input: TextInput,
pub heatmap_x_list_state: ListState,
pub heatmap_y_list_state: ListState,
pub heatmap_x_candidates: Vec<String>,
pub heatmap_y_candidates: Vec<String>,
pub row_limit: Option<usize>,
}Expand description
Chart modal state: chart kind, axes/columns, and options.
Fields§
§active: bool§chart_kind: ChartKind§chart_type: ChartType§x_column: Option<String>Remembered x-axis column (single; set with spacebar).
y_columns: Vec<String>Remembered y-axis column names (order = series order; set with spacebar, max Y_SERIES_MAX).
y_starts_at_zero: bool§log_scale: bool§show_legend: bool§focus: ChartFocus§x_input: TextInputText input for x-axis column search.
y_input: TextInputText input for y-axis column search.
x_list_state: ListStateList state for x-axis list (index into x_display_list).
y_list_state: ListStateList state for y-axis list (index into y_display_list).
x_candidates: Vec<String>Available columns for x-axis (datetime + numeric, order preserved for list).
y_candidates: Vec<String>Available numeric columns for y-axis.
hist_column: Option<String>Histogram: remembered column (single selection).
hist_bins: usize§hist_input: TextInput§hist_list_state: ListState§hist_candidates: Vec<String>§box_column: Option<String>Box plot: remembered column (single selection).
box_input: TextInput§box_list_state: ListState§box_candidates: Vec<String>§kde_column: Option<String>KDE: remembered column (single selection).
kde_bandwidth_factor: f64§kde_input: TextInput§kde_list_state: ListState§kde_candidates: Vec<String>§heatmap_x_column: Option<String>Heatmap: remembered x/y columns (single selection each).
heatmap_y_column: Option<String>§heatmap_bins: usize§heatmap_x_input: TextInput§heatmap_y_input: TextInput§heatmap_x_list_state: ListState§heatmap_y_list_state: ListState§heatmap_x_candidates: Vec<String>§heatmap_y_candidates: Vec<String>§row_limit: Option<usize>Maximum rows for chart data. None = unlimited (display “Unlimited”); Some(n) = cap at n.
Implementations§
Source§impl ChartModal
impl ChartModal
pub fn new() -> Self
Sourcepub fn open(
&mut self,
numeric_columns: &[String],
datetime_columns: &[String],
default_row_limit: Option<usize>,
)
pub fn open( &mut self, numeric_columns: &[String], datetime_columns: &[String], default_row_limit: Option<usize>, )
Open the chart modal. No default x or y columns; user selects with spacebar.
default_row_limit is the initial value for Limit Rows (e.g. from config); None = unlimited.
Sourcepub fn x_filtered(&self) -> Vec<String>
pub fn x_filtered(&self) -> Vec<String>
X-axis candidates filtered by current x search string (case-insensitive substring).
Sourcepub fn y_filtered(&self) -> Vec<String>
pub fn y_filtered(&self) -> Vec<String>
Y-axis candidates filtered by current y search string (case-insensitive substring).
Sourcepub fn x_display_list(&self) -> Vec<String>
pub fn x_display_list(&self) -> Vec<String>
X display list: remembered x first (if in filtered), then rest of filtered. Used for list rendering and index.
Sourcepub fn y_display_list(&self) -> Vec<String>
pub fn y_display_list(&self) -> Vec<String>
Y display list: remembered y columns first (in order, that are in filtered), then rest of filtered.
pub fn hist_filtered(&self) -> Vec<String>
pub fn hist_display_list(&self) -> Vec<String>
pub fn box_filtered(&self) -> Vec<String>
pub fn box_display_list(&self) -> Vec<String>
pub fn kde_filtered(&self) -> Vec<String>
pub fn kde_display_list(&self) -> Vec<String>
pub fn heatmap_x_filtered(&self) -> Vec<String>
pub fn heatmap_y_filtered(&self) -> Vec<String>
pub fn heatmap_x_display_list(&self) -> Vec<String>
pub fn heatmap_y_display_list(&self) -> Vec<String>
Sourcepub fn effective_x_column(&self) -> Option<&String>
pub fn effective_x_column(&self) -> Option<&String>
Effective x column for chart/export: the remembered x (no preview on scroll).
Sourcepub fn effective_y_columns(&self) -> Vec<String>
pub fn effective_y_columns(&self) -> Vec<String>
Effective y columns for chart/export: when Y list focused, remembered + highlighted (if not already remembered); else just remembered.
pub fn effective_hist_column(&self) -> Option<String>
pub fn effective_box_column(&self) -> Option<String>
pub fn effective_kde_column(&self) -> Option<String>
pub fn effective_heatmap_x_column(&self) -> Option<String>
pub fn effective_heatmap_y_column(&self) -> Option<String>
Sourcepub fn y_list_blur(&mut self)
pub fn y_list_blur(&mut self)
Called when Y list loses focus: if no series remembered and we had a highlighted row, remember it.
Sourcepub fn clamp_list_selections_to_filtered(&mut self)
pub fn clamp_list_selections_to_filtered(&mut self)
Clamp x/y list selection to display list length (e.g. after search filter changes).
pub fn close(&mut self)
Sourcepub fn next_focus(&mut self)
pub fn next_focus(&mut self)
Move focus to next/previous in sidebar. When leaving Y list, apply blur (remember highlight if only one).
pub fn prev_focus(&mut self)
Sourcepub fn toggle_y_starts_at_zero(&mut self)
pub fn toggle_y_starts_at_zero(&mut self)
Toggle Y starts at 0 (when focus is YStartsAtZero).
Sourcepub fn toggle_log_scale(&mut self)
pub fn toggle_log_scale(&mut self)
Toggle log scale (when focus is LogScale).
Sourcepub fn toggle_show_legend(&mut self)
pub fn toggle_show_legend(&mut self)
Toggle show legend (when focus is ShowLegend).
Sourcepub fn next_chart_type(&mut self)
pub fn next_chart_type(&mut self)
Cycle chart type: Line -> Scatter -> Bar -> Line.
pub fn prev_chart_type(&mut self)
pub fn next_chart_kind(&mut self)
pub fn prev_chart_kind(&mut self)
Sourcepub fn effective_row_limit(&self) -> usize
pub fn effective_row_limit(&self) -> usize
Effective row limit to pass to prepare_* (unlimited = CHART_ROW_LIMIT_MAX).
Sourcepub fn row_limit_display(&self) -> String
pub fn row_limit_display(&self) -> String
Display string for Limit Rows: “Unlimited” or number with commas.
pub fn adjust_hist_bins(&mut self, delta: i32)
pub fn adjust_heatmap_bins(&mut self, delta: i32)
pub fn adjust_kde_bandwidth_factor(&mut self, delta: f64)
Sourcepub fn adjust_row_limit(&mut self, delta: i32)
pub fn adjust_row_limit(&mut self, delta: i32)
Adjust row limit by delta (+/-). Step size depends on current value. None = unlimited.
Sourcepub fn adjust_row_limit_page(&mut self, delta: i32)
pub fn adjust_row_limit_page(&mut self, delta: i32)
Adjust row limit by 10,000 (PgUp / PgDown). None = unlimited.
Sourcepub fn x_list_down(&mut self)
pub fn x_list_down(&mut self)
Move x-axis list highlight down (does not change remembered x; use spacebar to remember).
Sourcepub fn x_list_toggle(&mut self)
pub fn x_list_toggle(&mut self)
Toggle x selection with spacebar: set remembered x to the highlighted row (single selection).
Sourcepub fn y_list_down(&mut self)
pub fn y_list_down(&mut self)
Move y-axis list highlight down (does not change remembered y; use spacebar to toggle).
Sourcepub fn y_list_toggle(&mut self)
pub fn y_list_toggle(&mut self)
Toggle y selection with spacebar: add highlighted to remembered (up to Y_SERIES_MAX) or remove if already remembered.
pub fn hist_list_down(&mut self)
pub fn hist_list_up(&mut self)
pub fn hist_list_toggle(&mut self)
pub fn box_list_down(&mut self)
pub fn box_list_up(&mut self)
pub fn box_list_toggle(&mut self)
pub fn kde_list_down(&mut self)
pub fn kde_list_up(&mut self)
pub fn kde_list_toggle(&mut self)
pub fn heatmap_x_list_down(&mut self)
pub fn heatmap_x_list_up(&mut self)
pub fn heatmap_x_list_toggle(&mut self)
pub fn heatmap_y_list_down(&mut self)
pub fn heatmap_y_list_up(&mut self)
pub fn heatmap_y_list_toggle(&mut self)
pub fn is_text_input_focused(&self) -> bool
pub fn can_export(&self) -> bool
Trait Implementations§
Source§impl Default for ChartModal
impl Default for ChartModal
Source§fn default() -> ChartModal
fn default() -> ChartModal
Auto Trait Implementations§
impl !Freeze for ChartModal
impl RefUnwindSafe for ChartModal
impl Send for ChartModal
impl Sync for ChartModal
impl Unpin for ChartModal
impl UnwindSafe for ChartModal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more