pub struct AxisLabelElement {
pub side: Side,
}Expand description
One axis’s tick-value labels — the band the numeric labels live in, between the tick ends and the outer chart edge.
Fields§
§side: SideTrait Implementations§
Source§impl Clone for AxisLabelElement
impl Clone for AxisLabelElement
Source§impl Debug for AxisLabelElement
impl Debug for AxisLabelElement
Source§impl Draggable for AxisLabelElement
impl Draggable for AxisLabelElement
Source§fn nudge_element(&self) -> Element
fn nudge_element(&self) -> Element
The nudge-path element this drag target moves. This mapping is the
only thing an implementation defines; movement itself happens in
Self::drag_by.Source§fn drag_by(&self, cfg: &mut C, dx: f32, dy: f32) -> NudgeResult
fn drag_by(&self, cfg: &mut C, dx: f32, dy: f32) -> NudgeResult
Default drag pipeline: apply the pointer delta through
Config::nudge. Returns NudgeResult::Rejected (and leaves cfg
untouched) when the move would leave the chart area. Read moreSource§impl PartialEq for AxisLabelElement
impl PartialEq for AxisLabelElement
Source§impl Selectable for AxisLabelElement
impl Selectable for AxisLabelElement
Source§fn element_id(&self) -> String
fn element_id(&self) -> String
Approximate interaction strip for representative label glyphs. It uses the renderer’s placement formula and a decimal/timestamp sample, but does not reproduce the renderer-owned tick set, formatting, pruning, or exact rendered-label union.
Source§fn bounds(&self, cfg: &Config, measure: &dyn MeasureText) -> Option<RectF>
fn bounds(&self, cfg: &Config, measure: &dyn MeasureText) -> Option<RectF>
Interaction bounds of this element under
cfg, or None when the
element is hidden, empty, or the layout is infeasible. Text-bearing
elements use measure; tick-label elements remain representative
strips rather than exact rendered-label unions.Source§fn as_draggable(&self) -> Option<&dyn Draggable>
fn as_draggable(&self) -> Option<&dyn Draggable>
Source§fn selection_box(
&self,
cfg: &C,
measure: &dyn MeasureText,
) -> Option<SelectionBox>
fn selection_box( &self, cfg: &C, measure: &dyn MeasureText, ) -> Option<SelectionBox>
Default selection policy: a blue box
SELECTION_PADDING px outside
the bounds, stroked SELECTION_STROKE_WIDTH px in
SELECTION_COLOR. Resizable elements additionally carry the eight
resize handle squares.Source§fn contains(&self, cfg: &C, measure: &dyn MeasureText, x: f32, y: f32) -> bool
fn contains(&self, cfg: &C, measure: &dyn MeasureText, x: f32, y: f32) -> bool
Default hit test: point-in-bounds.
impl StructuralPartialEq for AxisLabelElement
Auto Trait Implementations§
impl Freeze for AxisLabelElement
impl RefUnwindSafe for AxisLabelElement
impl Send for AxisLabelElement
impl Sync for AxisLabelElement
impl Unpin for AxisLabelElement
impl UnsafeUnpin for AxisLabelElement
impl UnwindSafe for AxisLabelElement
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