pub struct PlotLayout {
pub total: Rect,
pub plot_area: Rect,
pub title_area: Rect,
pub subtitle_area: Rect,
pub caption_area: Rect,
pub x_axis_area: Rect,
pub y_axis_area: Rect,
pub legend_area: Rect,
}Expand description
Computed layout areas for the plot.
Fields§
§total: Rect§plot_area: Rect§title_area: Rect§subtitle_area: Rect§caption_area: Rect§x_axis_area: Rect§y_axis_area: Rect§legend_area: RectImplementations§
Source§impl PlotLayout
impl PlotLayout
Sourcepub fn compute(
width: f64,
height: f64,
theme: &Theme,
has_title: bool,
has_legend: bool,
) -> Self
pub fn compute( width: f64, height: f64, theme: &Theme, has_title: bool, has_legend: bool, ) -> Self
Compute layout from total dimensions and theme settings.
Sourcepub fn compute_full(
width: f64,
height: f64,
theme: &Theme,
has_title: bool,
has_subtitle: bool,
has_caption: bool,
has_legend: bool,
x_axis_top: bool,
y_label_width: Option<f64>,
x_label_height: Option<f64>,
) -> Self
pub fn compute_full( width: f64, height: f64, theme: &Theme, has_title: bool, has_subtitle: bool, has_caption: bool, has_legend: bool, x_axis_top: bool, y_label_width: Option<f64>, x_label_height: Option<f64>, ) -> Self
Compute layout with full subtitle/caption support.
y_label_width optionally overrides the reserved width (px) of the
y-axis tick-label text — measured from the actual break labels by the
caller so long categorical labels (e.g. a flipped bar chart’s rows)
aren’t clipped. None keeps the fixed axis_text_y.size * 3.5 estimate.
Auto Trait Implementations§
impl Freeze for PlotLayout
impl RefUnwindSafe for PlotLayout
impl Send for PlotLayout
impl Sync for PlotLayout
impl Unpin for PlotLayout
impl UnsafeUnpin for PlotLayout
impl UnwindSafe for PlotLayout
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
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> ⓘ
Converts
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> ⓘ
Converts
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 more