SvgChartConfigBuilder

Struct SvgChartConfigBuilder 

Source
pub struct SvgChartConfigBuilder { /* private fields */ }
Expand description

Builder for SvgChartConfig.

Implementations§

Source§

impl SvgChartConfigBuilder

Source

pub fn chart_layout(&mut self, value: Layout) -> &mut Self

Chart layout

Whether to plot channels on separate charts or combined charts.

Default - Layout::Separate

Source

pub fn with_inputs(&mut self, value: bool) -> &mut Self

Whether to include inputs in snapshot

Default - false

Source

pub fn svg_width(&mut self, value: usize) -> &mut Self

Optional width of the SVG viewBox

None means proportional to num_samples

Source

pub fn svg_height_per_channel(&mut self, value: usize) -> &mut Self

Height of one channel in the SVG viewBox

Default - 500

Source

pub fn preserve_aspect_ratio<VALUE: Into<SvgPreserveAspectRatio>>( &mut self, value: VALUE, ) -> &mut Self

SVG aspect ratio preservation

Default - None

Source

pub fn try_preserve_aspect_ratio<VALUE: TryInto<SvgPreserveAspectRatio>>( &mut self, value: VALUE, ) -> Result<&mut Self, VALUE::Error>

SVG aspect ratio preservation

Default - None

Source

pub fn show_labels(&mut self, value: bool) -> &mut Self

Show ax- labels

Default - true

Source

pub fn format_x_axis_labels_as_time(&mut self, value: bool) -> &mut Self

X axis labels format

Whether to format X axis labels as time

Default - false

Source

pub fn max_labels_x_axis(&mut self, value: Option<usize>) -> &mut Self

Maximum number of labels along X axis

Default - Some(5)

Source

pub fn chart_title<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self

Optional chart title

Default - None

Source

pub fn output_titles<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self

Optional titles for output channels

Default - empty Vec

Source

pub fn output_title<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE, ) -> &mut Self
where Vec<String>: Default + Extend<VALUE>,

Optional titles for output channels

Default - empty Vec

Source

pub fn input_titles<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self

Optional titles for input channels

Default - empty Vec

Source

pub fn input_title<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE, ) -> &mut Self
where Vec<String>: Default + Extend<VALUE>,

Optional titles for input channels

Default - empty Vec

Source

pub fn show_grid(&mut self, value: bool) -> &mut Self

Show grid lines on the chart

Default - false

Source

pub fn line_width(&mut self, value: f32) -> &mut Self

Waveform line thickness

Default - 2.0

Source

pub fn background_color<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self

Chart background color (hex string)

Default - “#000000” (black)

Source

pub fn output_colors<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self

Custom colors for output channels (hex strings)

Default - None (uses default palette)

Source

pub fn output_color<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE, ) -> &mut Self
where Vec<String>: Default + Extend<VALUE>,

Custom colors for output channels (hex strings)

Default - None (uses default palette)

Source

pub fn input_colors<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self

Custom colors for input channels (hex strings)

Default - None (uses default palette)

Source

pub fn input_color<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE, ) -> &mut Self
where Vec<String>: Default + Extend<VALUE>,

Custom colors for input channels (hex strings)

Default - None (uses default palette)

Source

pub fn build(&self) -> Result<SvgChartConfig, SvgChartConfigBuilderError>

Builds a new SvgChartConfig.

§Errors

If a required field has not been initialized.

Trait Implementations§

Source§

impl Clone for SvgChartConfigBuilder

Source§

fn clone(&self) -> SvgChartConfigBuilder

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for SvgChartConfigBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl TryFrom<SvgChartConfigBuilder> for SnapshotOutputMode

Source§

type Error = SvgChartConfigBuilderError

The type returned in the event of a conversion error.
Source§

fn try_from(value: SvgChartConfigBuilder) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.