pub struct MarginConfig {Show 13 fields
pub has_title: bool,
pub has_x_axis_label: bool,
pub has_y_axis_label: bool,
pub has_right_axis: bool,
pub legend_height: f64,
pub y_tick_labels: Vec<String>,
pub right_tick_labels: Vec<String>,
pub x_label_strategy_margin: f64,
pub max_left_margin: f64,
pub max_right_margin: f64,
pub chart_height: f64,
pub tick_value_metrics: TextMetrics,
pub axis_label_metrics: TextMetrics,
}Expand description
Configuration for margin calculation.
Fields§
§has_title: bool§has_x_axis_label: bool§has_y_axis_label: bool§has_right_axis: bool§legend_height: f64Actual legend height in pixels (0.0 when no legend is present).
This should be pre-computed via calculate_legend_layout().total_height
so that multi-row legends get proper bottom margin space.
y_tick_labels: Vec<String>§right_tick_labels: Vec<String>§x_label_strategy_margin: f64§max_left_margin: f64§max_right_margin: f64§chart_height: f64Total SVG height — used to scale bottom margin for small charts.
tick_value_metrics: TextMetricsText metrics used to measure numeric tick labels (left/right axes).
Defaults to the legacy 12px sans calibration; override via
TextMetrics::from_theme_tick_value(theme) when the theme overrides
numeric typography.
axis_label_metrics: TextMetricsText metrics used to reserve room for the rotated Y-axis label. Defaults to legacy.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MarginConfig
impl RefUnwindSafe for MarginConfig
impl Send for MarginConfig
impl Sync for MarginConfig
impl Unpin for MarginConfig
impl UnsafeUnpin for MarginConfig
impl UnwindSafe for MarginConfig
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
Mutably borrows from an owned value. Read more