pub struct GridLayer { /* private fields */ }Expand description
Grid layer that renders background grid lines
Implementations§
Source§impl GridLayer
impl GridLayer
Sourcepub fn set_show_major_lines(&mut self, show: bool)
pub fn set_show_major_lines(&mut self, show: bool)
Enable or disable major grid lines
Sourcepub fn set_show_minor_lines(&mut self, show: bool)
pub fn set_show_minor_lines(&mut self, show: bool)
Enable or disable minor grid lines
Sourcepub fn set_auto_spacing(&mut self, auto: bool)
pub fn set_auto_spacing(&mut self, auto: bool)
Set whether to automatically calculate grid spacing
Sourcepub fn set_major_spacing_pixels(&mut self, spacing: f32)
pub fn set_major_spacing_pixels(&mut self, spacing: f32)
Set major grid line spacing in pixels
Trait Implementations§
Source§impl Layer for GridLayer
impl Layer for GridLayer
Source§fn stage(&self) -> LayerStage
fn stage(&self) -> LayerStage
Rendering stage for the layer. Stages define coarse ordering buckets.
Source§fn update(
&mut self,
_data: &ChartData,
_viewport: &Viewport,
_theme: &ChartTheme,
_style: &ChartStyle,
)
fn update( &mut self, _data: &ChartData, _viewport: &Viewport, _theme: &ChartTheme, _style: &ChartStyle, )
Update the layer with new data Read more
Source§fn render(
&self,
context: &mut RenderContext,
_render_pass: &mut RenderPass<'_>,
) -> Result<()>
fn render( &self, context: &mut RenderContext, _render_pass: &mut RenderPass<'_>, ) -> Result<()>
Render the layer to the GPU context Read more
Source§fn needs_render(&self) -> bool
fn needs_render(&self) -> bool
Check if the layer needs to be rendered Read more
Source§fn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Check if the layer is currently enabled
Source§fn set_enabled(&mut self, enabled: bool)
fn set_enabled(&mut self, enabled: bool)
Enable or disable the layer
Source§fn get_config(&self) -> Value
fn get_config(&self) -> Value
Get layer configuration as a JSON-serializable value Read more
Auto Trait Implementations§
impl Freeze for GridLayer
impl RefUnwindSafe for GridLayer
impl Send for GridLayer
impl Sync for GridLayer
impl Unpin for GridLayer
impl UnsafeUnpin for GridLayer
impl UnwindSafe for GridLayer
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