pub struct HeaderConfig {
Show 32 fields pub format: Option<Format>, pub format_type: Option<String>, pub label_align: Option<TitleAlignUnion>, pub label_anchor: Option<TitleAnchorEnum>, pub label_angle: Option<f64>, pub label_baseline: Option<TextBaseline>, pub label_color: Option<Box<Color>>, pub label_expr: Option<String>, pub label_font: Option<Box<Color>>, pub label_font_size: Option<CornerRadiusUnion>, pub label_font_style: Option<Box<Color>>, pub label_font_weight: Option<FontWeightUnion>, pub label_limit: Option<CornerRadiusUnion>, pub label_line_height: Option<CornerRadiusUnion>, pub label_orient: Option<Orient>, pub label_padding: Option<CornerRadiusUnion>, pub labels: Option<bool>, pub orient: Option<Orient>, pub title: RemovableValue<Value>, pub title_align: Option<TitleAlignUnion>, pub title_anchor: Option<TitleAnchorEnum>, pub title_angle: Option<f64>, pub title_baseline: Option<TextBaseline>, pub title_color: Option<Box<Color>>, pub title_font: Option<Box<Color>>, pub title_font_size: Option<CornerRadiusUnion>, pub title_font_style: Option<Box<Color>>, pub title_font_weight: Option<FontWeightUnion>, pub title_limit: Option<CornerRadiusUnion>, pub title_line_height: Option<CornerRadiusUnion>, pub title_orient: Option<Orient>, pub title_padding: Option<CornerRadiusUnion>,
}
Expand description

Header configuration, which determines default properties for all headers.

For a full list of header configuration options, please see the corresponding section of in the header documentation.

Header configuration, which determines default properties for column headers.

For a full list of header configuration options, please see the corresponding section of in the header documentation.

Header configuration, which determines default properties for non-row/column facet headers.

For a full list of header configuration options, please see the corresponding section of in the header documentation.

Header configuration, which determines default properties for row headers.

For a full list of header configuration options, please see the corresponding section of in the header documentation.

Fields§

§format: Option<Format>

When used with the default "number" and "time" format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.

See the format documentation for more examples.

When used with a custom formatType, this value will be passed as format alongside datum.value to the registered function.

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

§format_type: Option<String>

The format type for labels. One of "number", "time", or a registered custom format type.

Default value: - "time" for temporal fields and ordinal and nominal fields with timeUnit. - "number" for quantitative fields as well as ordinal and nominal fields without timeUnit.

§label_align: Option<TitleAlignUnion>

Horizontal text alignment of header labels. One of "left", "center", or "right".

§label_anchor: Option<TitleAnchorEnum>

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.

§label_angle: Option<f64>

The rotation angle of the header labels.

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

§label_baseline: Option<TextBaseline>

The vertical text baseline for the header labels. One of "alphabetic" (default), "top", "middle", "bottom", "line-top", or "line-bottom". The "line-top" and "line-bottom" values operate similarly to "top" and "bottom", but are calculated relative to the titleLineHeight rather than titleFontSize alone.

§label_color: Option<Box<Color>>

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

§label_expr: Option<String>

Vega expression for customizing labels.

Note: The label text and value can be assessed via the label and value properties of the header’s backing datum object.

§label_font: Option<Box<Color>>

The font of the header label.

§label_font_size: Option<CornerRadiusUnion>

The font size of the header label, in pixels.

§label_font_style: Option<Box<Color>>

The font style of the header label.

§label_font_weight: Option<FontWeightUnion>

The font weight of the header label.

§label_limit: Option<CornerRadiusUnion>

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

§label_line_height: Option<CornerRadiusUnion>

Line height in pixels for multi-line header labels or title text with "line-top" or "line-bottom" baseline.

§label_orient: Option<Orient>

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

§label_padding: Option<CornerRadiusUnion>

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

Default value: 10

§labels: Option<bool>

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

Default value: true.

§orient: Option<Orient>

Shortcut for setting both labelOrient and titleOrient.

§title: RemovableValue<Value>

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

§title_align: Option<TitleAlignUnion>

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

§title_anchor: Option<TitleAnchorEnum>

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.

§title_angle: Option<f64>

The rotation angle of the header title.

Default value: 0.

§title_baseline: Option<TextBaseline>

The vertical text baseline for the header title. One of "alphabetic" (default), "top", "middle", "bottom", "line-top", or "line-bottom". The "line-top" and "line-bottom" values operate similarly to "top" and "bottom", but are calculated relative to the titleLineHeight rather than titleFontSize alone.

Default value: "middle"

§title_color: Option<Box<Color>>

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

§title_font: Option<Box<Color>>

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

§title_font_size: Option<CornerRadiusUnion>

Font size of the header title.

§title_font_style: Option<Box<Color>>

The font style of the header title.

§title_font_weight: Option<FontWeightUnion>

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

§title_limit: Option<CornerRadiusUnion>

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

§title_line_height: Option<CornerRadiusUnion>

Line height in pixels for multi-line header title text or title text with "line-top" or "line-bottom" baseline.

§title_orient: Option<Orient>

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

§title_padding: Option<CornerRadiusUnion>

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

Default value: 10

Trait Implementations§

source§

impl Clone for HeaderConfig

source§

fn clone(&self) -> HeaderConfig

Returns a copy 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 Debug for HeaderConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for HeaderConfig

source§

fn default() -> HeaderConfig

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

impl<'de> Deserialize<'de> for HeaderConfig

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for HeaderConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,