pub struct SvgChartConfigBuilder { /* private fields */ }Expand description
Builder for SvgChartConfig.
Implementations§
Source§impl SvgChartConfigBuilder
impl SvgChartConfigBuilder
Sourcepub fn chart_layout(&mut self, value: Layout) -> &mut Self
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
Sourcepub fn with_inputs(&mut self, value: bool) -> &mut Self
pub fn with_inputs(&mut self, value: bool) -> &mut Self
Whether to include inputs in snapshot
Default - false
Sourcepub fn svg_width(&mut self, value: usize) -> &mut Self
pub fn svg_width(&mut self, value: usize) -> &mut Self
Optional width of the SVG viewBox
None means proportional to num_samples
Sourcepub fn svg_height_per_channel(&mut self, value: usize) -> &mut Self
pub fn svg_height_per_channel(&mut self, value: usize) -> &mut Self
Height of one channel in the SVG viewBox
Default - 500
Sourcepub fn show_labels(&mut self, value: bool) -> &mut Self
pub fn show_labels(&mut self, value: bool) -> &mut Self
Show ax- labels
Default - true
Sourcepub fn format_x_axis_labels_as_time(&mut self, value: bool) -> &mut Self
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
Sourcepub fn max_labels_x_axis(&mut self, value: Option<usize>) -> &mut Self
pub fn max_labels_x_axis(&mut self, value: Option<usize>) -> &mut Self
Maximum number of labels along X axis
Default - Some(5)
Sourcepub fn chart_title<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn chart_title<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Optional chart title
Default - None
Sourcepub fn output_titles<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn output_titles<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Optional titles for output channels
Default - empty Vec
Sourcepub fn output_title<VALUE, FROM_VALUE: Into<VALUE>>(
&mut self,
item: FROM_VALUE,
) -> &mut Self
pub fn output_title<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE, ) -> &mut Self
Optional titles for output channels
Default - empty Vec
Sourcepub fn input_titles<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn input_titles<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Optional titles for input channels
Default - empty Vec
Sourcepub fn input_title<VALUE, FROM_VALUE: Into<VALUE>>(
&mut self,
item: FROM_VALUE,
) -> &mut Self
pub fn input_title<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE, ) -> &mut Self
Optional titles for input channels
Default - empty Vec
Sourcepub fn show_grid(&mut self, value: bool) -> &mut Self
pub fn show_grid(&mut self, value: bool) -> &mut Self
Show grid lines on the chart
Default - false
Sourcepub fn line_width(&mut self, value: f32) -> &mut Self
pub fn line_width(&mut self, value: f32) -> &mut Self
Waveform line thickness
Default - 2.0
Sourcepub fn background_color<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn background_color<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
Chart background color (hex string)
Default - “#000000” (black)
Sourcepub fn output_colors<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
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)
Sourcepub fn output_color<VALUE, FROM_VALUE: Into<VALUE>>(
&mut self,
item: FROM_VALUE,
) -> &mut Self
pub fn output_color<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE, ) -> &mut Self
Custom colors for output channels (hex strings)
Default - None (uses default palette)
Sourcepub fn input_colors<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
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)
Sourcepub fn input_color<VALUE, FROM_VALUE: Into<VALUE>>(
&mut self,
item: FROM_VALUE,
) -> &mut Self
pub fn input_color<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE, ) -> &mut Self
Custom colors for input channels (hex strings)
Default - None (uses default palette)
Sourcepub fn build(&self) -> Result<SvgChartConfig, SvgChartConfigBuilderError>
pub fn build(&self) -> Result<SvgChartConfig, SvgChartConfigBuilderError>
Trait Implementations§
Source§impl Clone for SvgChartConfigBuilder
impl Clone for SvgChartConfigBuilder
Source§fn clone(&self) -> SvgChartConfigBuilder
fn clone(&self) -> SvgChartConfigBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more