pub struct LegendSpec {
pub title: String,
pub units: String,
pub ramp: ColorRamp,
pub min_value: f64,
pub max_value: f64,
pub labeled_stops: Vec<LabeledStop>,
pub normalization: NormalizationMode,
}Expand description
Legend metadata sufficient for client-side UI rendering.
Rustial does not render the legend itself. This struct carries enough information for a client application to build a legend widget in Bevy UI, egui, HTML, or any other framework.
Fields§
§title: StringHuman-readable title (e.g. "Agent Density").
units: StringUnits string (e.g. "agents/m2", "dBm", "%").
ramp: ColorRampThe colour ramp driving both renderer output and legend display.
min_value: f64Minimum data value (maps to ramp position 0.0).
max_value: f64Maximum data value (maps to ramp position 1.0).
labeled_stops: Vec<LabeledStop>Optional labeled tick marks for the legend.
normalization: NormalizationModeHow values should be presented.
Implementations§
Trait Implementations§
Source§impl Clone for LegendSpec
impl Clone for LegendSpec
Source§fn clone(&self) -> LegendSpec
fn clone(&self) -> LegendSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LegendSpec
impl RefUnwindSafe for LegendSpec
impl Send for LegendSpec
impl Sync for LegendSpec
impl Unpin for LegendSpec
impl UnsafeUnpin for LegendSpec
impl UnwindSafe for LegendSpec
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