pub struct VgTitleConfig {
    pub anchor: Option<Anchor>,
    pub angle: Option<f64>,
    pub baseline: Option<VerticalAlign>,
    pub color: Option<String>,
    pub font: Option<String>,
    pub font_size: Option<f64>,
    pub font_weight: Option<FontWeight>,
    pub limit: Option<f64>,
    pub offset: Option<f64>,
    pub orient: Option<TitleOrient>,
}
Expand description

Title configuration, which determines default properties for all titles. For a full list of title configuration options, please see the corresponding section of the title documentation.

Fields§

§anchor: Option<Anchor>

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.

Default value: "middle" for single and layered views. "start" for other composite views.

Note: For now, anchor is only customizable only for single and layered views. For other composite views, anchor is always "start".

§angle: Option<f64>

Angle in degrees of title text.

§baseline: Option<VerticalAlign>

Vertical text baseline for title text.

§color: Option<String>

Text color for title text.

§font: Option<String>

Font name for title text.

§font_size: Option<f64>

Font size in pixels for title text.

Default value: 10.

§font_weight: Option<FontWeight>

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

§limit: Option<f64>

The maximum allowed length in pixels of legend labels.

§offset: Option<f64>

Offset in pixels of the title from the chart body and axes.

§orient: Option<TitleOrient>

Default title orientation (“top”, “bottom”, “left”, or “right”)

Trait Implementations§

Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.