pub struct PlotConfig {Show 33 fields
pub title: Option<String>,
pub x: AxisConfig,
pub y: AxisConfig,
pub y2: AxisConfig,
pub title_size: f32,
pub title_color: Option<Color32>,
pub title_align: TitleAlign,
pub label_size: f32,
pub tick_size: f32,
pub legend_size: f32,
pub frame_width: f32,
pub grid_width: f32,
pub grid_major_opacity: f32,
pub grid_minor_opacity: f32,
pub tick_length: f32,
pub line_scale: f32,
pub marker_scale: f32,
pub legend: LegendPosition,
pub legend_frame: bool,
pub toolbar: bool,
pub hover_guides: bool,
pub hover_popup: bool,
pub legend_hover: LegendHoverConfig,
pub direction: DirectionArrowConfig,
pub pie: PieConfig,
pub radar: RadarConfig,
pub gauge: GaugeConfig,
pub heatmap: HeatmapConfig,
pub waterfall: WaterfallConfig,
pub colors: PlotColors,
pub series: Vec<SeriesStyle>,
pub measurement: MeasurementConfig,
pub renderer: Renderer,
}Expand description
The complete appearance of a plot.
Fields§
§title: Option<String>Title above the data area.
x: AxisConfigThe horizontal axis.
y: AxisConfigThe vertical axis on the left.
y2: AxisConfigThe secondary vertical axis on the right, shown when a series uses
YAxis::Right. Its grid is off by default.
title_size: f32Title size in points.
title_color: Option<Color32>Title color; PlotColors::text (or the theme) when None.
title_align: TitleAlignTitle alignment over the data area.
label_size: f32Axis title size in points.
tick_size: f32Tick label size in points.
legend_size: f32Legend text size in points.
frame_width: f32Frame line width in points.
grid_width: f32Grid line width in points.
grid_major_opacity: f32Opacity of major grid lines, 0–1.
grid_minor_opacity: f32Opacity of minor grid lines, 0–1.
tick_length: f32Length of the major tick marks outside the frame (minor marks are half).
line_scale: f32Multiplies every line width.
marker_scale: f32Multiplies every marker size.
legend: LegendPositionLegend corner or hidden.
legend_frame: boolDraw the legend’s background box.
toolbar: boolShow the tool buttons.
hover_guides: boolDashed guides from the hovered point to the axes.
hover_popup: boolThe hover popup.
legend_hover: LegendHoverConfigThe animation played while a legend row is hovered.
direction: DirectionArrowConfigThe arrow beside the newest point of a line (for streaming data).
pie: PieConfigPie and donut layout.
radar: RadarConfigRadar axes and fill.
gauge: GaugeConfigGauge arc and labels.
heatmap: HeatmapConfigHeatmap opacity and color scale.
waterfall: WaterfallConfigWaterfall width and connectors.
colors: PlotColorsTheme overrides.
series: Vec<SeriesStyle>Per-series overrides.
measurement: MeasurementConfigMeasurement mode, snapping, and labels.
renderer: RendererCPU or GPU data layer.
Implementations§
Source§impl PlotConfig
impl PlotConfig
Sourcepub fn series_style(&self, name: &str) -> Option<&SeriesStyle>
pub fn series_style(&self, name: &str) -> Option<&SeriesStyle>
The overrides for name, if any.
Sourcepub fn series_style_mut(&mut self, name: &str) -> &mut SeriesStyle
pub fn series_style_mut(&mut self, name: &str) -> &mut SeriesStyle
The overrides for name, created empty when missing.
Trait Implementations§
Source§impl Clone for PlotConfig
impl Clone for PlotConfig
Source§impl Debug for PlotConfig
impl Debug for PlotConfig
Source§impl Default for PlotConfig
impl Default for PlotConfig
Source§impl<'de> Deserialize<'de> for PlotConfig
Available on crate feature serde only.
impl<'de> Deserialize<'de> for PlotConfig
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for PlotConfig
impl PartialEq for PlotConfig
Source§impl Serialize for PlotConfig
Available on crate feature serde only.
impl Serialize for PlotConfig
serde only.impl StructuralPartialEq for PlotConfig
Auto Trait Implementations§
impl Forget for PlotConfig
impl Freeze for PlotConfigwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<SeriesStyle>: Freeze,
impl Move for PlotConfig
impl RefUnwindSafe for PlotConfig
impl Send for PlotConfigwhere
RawVecInner: Send,
impl Sync for PlotConfigwhere
RawVecInner: Sync,
impl Unpin for PlotConfig
impl UnsafeUnpin for PlotConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<SeriesStyle>: UnsafeUnpin,
impl UnwindSafe for PlotConfigwhere
RawVecInner: UnwindSafe,
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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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