Struct HeaderConfigBuilder

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

Builder for HeaderConfig.

Implementations§

Source§

impl HeaderConfigBuilder

Source

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

The text formatting pattern for labels of guides (axes, legends, headers) and text marks.

See the format documentation for more examples.

Default value: Derived from numberFormat config for number format and from timeFormat config for time format.

Source

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

The format type for labels ("number" or "time").

Default value:

  • "time" for temporal fields and ordinal and nomimal fields with timeUnit.
  • "number" for quantitative fields as well as ordinal and nomimal fields without timeUnit.
Source

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

Horizontal text alignment of header labels.

Source

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

The anchor position for placing the labels. One of "start", "middle", or "end". For example, with a label orientation of top these anchor positions map to a left-, center-, or right-aligned label.

Source

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

The rotation angle of the header labels.

Default value: 0 for column header, -90 for row header.

Source

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

The color of the header label, can be in hex color code or regular color name.

Source

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

The font of the header label.

Source

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

The font size of the header label, in pixels.

Source

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

The font style of the header label.

Source

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

The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.

Default value: 0, indicating no limit

Source

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

The orientation of the header label. One of "top", "bottom", "left" or "right".

Source

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

The padding, in pixel, between facet header’s label and the plot.

Default value: 10

Source

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

A boolean flag indicating if labels should be included as part of the header.

Default value: true.

Source

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

Whether month names and weekday names should be abbreviated.

Default value: false

Source

pub fn title<VALUE: Into<RemovableValue<Value>>>( &mut self, value: VALUE, ) -> &mut Self

Set to null to disable title for the axis, legend, or header.

Source

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

Horizontal text alignment (to the anchor) of header titles.

Source

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

The anchor position for placing the title. One of "start", "middle", or "end". For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.

Source

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

The rotation angle of the header title.

Default value: 0.

Source

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

Vertical text baseline for the header title. One of "top", "bottom", "middle".

Default value: "middle"

Source

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

Color of the header title, can be in hex color code or regular color name.

Source

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

Font of the header title. (e.g., "Helvetica Neue").

Source

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

Font size of the header title.

Source

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

The font style of the header title.

Source

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

Font weight of the header title. This can be either a string (e.g "bold", "normal") or a number (100, 200, 300, …, 900 where "normal" = 400 and "bold" = 700).

Source

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

The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.

Default value: 0, indicating no limit

Source

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

The orientation of the header title. One of "top", "bottom", "left" or "right".

Source

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

The padding, in pixel, between facet header’s title and the label.

Default value: 10

Source

pub fn build(&self) -> Result<HeaderConfig, String>

Builds a new HeaderConfig.

§Errors

If a required field has not been initialized.

Trait Implementations§

Source§

impl Clone for HeaderConfigBuilder

Source§

fn clone(&self) -> HeaderConfigBuilder

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 HeaderConfigBuilder

Source§

fn default() -> HeaderConfigBuilder

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

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> 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> 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.