pub struct HeatmapStrip {
pub config: HeatmapStripConfig,
/* private fields */
}Expand description
Heatmap strip visualization
Fields§
§config: HeatmapStripConfigConfiguration
Implementations§
Source§impl HeatmapStrip
impl HeatmapStrip
Sourcepub fn with_config(config: HeatmapStripConfig) -> Self
pub fn with_config(config: HeatmapStripConfig) -> Self
Create with custom configuration
Sourcepub fn set_data(&mut self, data: impl IntoIterator<Item = (usize, f64, f64)>)
pub fn set_data(&mut self, data: impl IntoIterator<Item = (usize, f64, f64)>)
Set the cells from delta/volume data, sorting them by bar index.
Sourcepub fn add_cell(&mut self, bar_idx: usize, delta: f64, volume: f64)
pub fn add_cell(&mut self, bar_idx: usize, delta: f64, volume: f64)
Add a single cell, keeping the cells ordered by bar index. Appending in bar-index order takes amortized constant time.
Sourcepub fn cells(&self) -> impl ExactSizeIterator<Item = HeatmapCell> + '_
pub fn cells(&self) -> impl ExactSizeIterator<Item = HeatmapCell> + '_
Cells in bar-index order, with intensities normalized against all held deltas.
Sourcepub fn render(
&self,
ui: &mut Ui,
strip_rect: Rect,
visible_range: (usize, usize),
bar_width: f32,
x: impl Fn(usize) -> f32,
)
pub fn render( &self, ui: &mut Ui, strip_rect: Rect, visible_range: (usize, usize), bar_width: f32, x: impl Fn(usize) -> f32, )
Render the heatmap strip
§Arguments
ui- The egui UI contextstrip_rect- The rectangle where the strip should be drawnvisible_range- The inclusive visible bar index range (start, end)bar_width- Spacing between bar centres in logical pointsx- The screen x coordinate of each absolute bar index’s centre
Trait Implementations§
Source§impl Clone for HeatmapStrip
impl Clone for HeatmapStrip
Source§fn clone(&self) -> HeatmapStrip
fn clone(&self) -> HeatmapStrip
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HeatmapStrip
impl Debug for HeatmapStrip
Source§impl Default for HeatmapStrip
impl Default for HeatmapStrip
Source§fn default() -> HeatmapStrip
fn default() -> HeatmapStrip
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HeatmapStrip
impl RefUnwindSafe for HeatmapStrip
impl Send for HeatmapStrip
impl Sync for HeatmapStrip
impl Unpin for HeatmapStrip
impl UnsafeUnpin for HeatmapStrip
impl UnwindSafe for HeatmapStrip
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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