Struct vega_lite::VgTitleConfig
source · 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”)