[−][src]Struct vega_lite_4::HeaderConfigBuilder
Builder for HeaderConfig
.
Implementations
impl HeaderConfigBuilder
[src]
pub fn format<VALUE: Into<Format>>(&mut self, value: VALUE) -> &mut Self
[src]
When used with the default "number"
and "time"
format type, the text formatting
pattern for labels of guides (axes, legends, headers) and text marks.
- If the format type is
"number"
(e.g., for quantitative fields), this is D3's number format pattern. - If the format type is"time"
(e.g., for temporal fields), this is D3's time format pattern.
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.
pub fn format_type<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
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
.
pub fn label_align<VALUE: Into<TitleAlignUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Horizontal text alignment of header labels. One of "left"
, "center"
, or "right"
.
pub fn label_anchor<VALUE: Into<TitleAnchorEnum>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&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.
pub fn label_angle<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The rotation angle of the header labels.
Default value: 0
for column header, -90
for row header.
pub fn label_baseline<VALUE: Into<TextBaseline>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
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.
pub fn label_color<VALUE: Into<Color>>(&mut self, value: VALUE) -> &mut Self
[src]
The color of the header label, can be in hex color code or regular color name.
pub fn label_expr<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
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.
pub fn label_font<VALUE: Into<Color>>(&mut self, value: VALUE) -> &mut Self
[src]
The font of the header label.
pub fn label_font_size<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The font size of the header label, in pixels.
pub fn label_font_style<VALUE: Into<Color>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The font style of the header label.
pub fn label_font_weight<VALUE: Into<FontWeightUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The font weight of the header label.
pub fn label_limit<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&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
pub fn label_line_height<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Line height in pixels for multi-line header labels or title text with "line-top"
or
"line-bottom"
baseline.
pub fn label_orient<VALUE: Into<Orient>>(&mut self, value: VALUE) -> &mut Self
[src]
The orientation of the header label. One of "top"
, "bottom"
, "left"
or "right"
.
pub fn label_padding<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The padding, in pixel, between facet header's label and the plot.
Default value: 10
pub fn labels<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
[src]
A boolean flag indicating if labels should be included as part of the header.
Default value: true
.
pub fn orient<VALUE: Into<Orient>>(&mut self, value: VALUE) -> &mut Self
[src]
Shortcut for setting both labelOrient and titleOrient.
pub fn title<VALUE: Into<RemovableValue<Value>>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Set to null to disable title for the axis, legend, or header.
pub fn title_align<VALUE: Into<TitleAlignUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Horizontal text alignment (to the anchor) of header titles.
pub fn title_anchor<VALUE: Into<TitleAnchorEnum>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&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.
pub fn title_angle<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The rotation angle of the header title.
Default value: 0
.
pub fn title_baseline<VALUE: Into<TextBaseline>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
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"
pub fn title_color<VALUE: Into<Color>>(&mut self, value: VALUE) -> &mut Self
[src]
Color of the header title, can be in hex color code or regular color name.
pub fn title_font<VALUE: Into<Color>>(&mut self, value: VALUE) -> &mut Self
[src]
Font of the header title. (e.g., "Helvetica Neue"
).
pub fn title_font_size<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Font size of the header title.
pub fn title_font_style<VALUE: Into<Color>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The font style of the header title.
pub fn title_font_weight<VALUE: Into<FontWeightUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&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
).
pub fn title_limit<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&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
pub fn title_line_height<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Line height in pixels for multi-line header title text or title text with "line-top"
or
"line-bottom"
baseline.
pub fn title_orient<VALUE: Into<Orient>>(&mut self, value: VALUE) -> &mut Self
[src]
The orientation of the header title. One of "top"
, "bottom"
, "left"
or "right"
.
pub fn title_padding<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The padding, in pixel, between facet header's title and the label.
Default value: 10
pub fn build(&self) -> Result<HeaderConfig, String>
[src]
Trait Implementations
impl Clone for HeaderConfigBuilder
[src]
pub fn clone(&self) -> HeaderConfigBuilder
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for HeaderConfigBuilder
[src]
pub fn default() -> HeaderConfigBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for HeaderConfigBuilder
[src]
impl Send for HeaderConfigBuilder
[src]
impl Sync for HeaderConfigBuilder
[src]
impl Unpin for HeaderConfigBuilder
[src]
impl UnwindSafe for HeaderConfigBuilder
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,