[][src]Struct vega_lite_3::AxisConfigBuilder

pub struct AxisConfigBuilder { /* fields omitted */ }

Builder for AxisConfig.

Methods

impl AxisConfigBuilder[src]

pub fn band_position<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

An interpolation fraction indicating where, for band scales, axis ticks should be positioned. A value of 0 places ticks at the left edge of their bands. A value of 0.5 places ticks in the middle of their bands.

Default value: 0.5

pub fn domain<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self[src]

A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.

Default value: true

pub fn domain_color<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self[src]

Color of axis domain line.

Default value: "gray".

pub fn domain_dash<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self[src]

An array of alternating [stroke, space] lengths for dashed domain lines.

pub fn domain_dash_offset<VALUE: Into<f64>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

The pixel offset at which to start drawing with the domain dash array.

pub fn domain_opacity<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

Opacity of the axis domain line.

pub fn domain_width<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

Stroke width of axis domain line

Default value: 1

pub fn grid<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self[src]

A boolean flag indicating if grid lines should be included as part of the axis

Default value: true for continuous scales that are not binned; otherwise, false.

pub fn grid_color<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self[src]

Color of gridlines.

Default value: "lightGray".

pub fn grid_dash<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self[src]

An array of alternating [stroke, space] lengths for dashed grid lines.

pub fn grid_dash_offset<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

The pixel offset at which to start drawing with the grid dash array.

pub fn grid_opacity<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

The stroke opacity of grid (value between [0,1])

Default value: 1

pub fn grid_width<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

The grid width, in pixels.

Default value: 1

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

Horizontal text alignment of axis tick labels, overriding the default setting for the current axis orientation.

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

The rotation angle of the axis labels.

Default value: -90 for nominal and ordinal fields; 0 otherwise.

pub fn label_baseline<VALUE: Into<TextBaseline>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Vertical text baseline of axis tick labels, overriding the default setting for the current axis orientation. Can be "top", "middle", "bottom", or "alphabetic".

pub fn label_bound<VALUE: Into<Label>>(&mut self, value: VALUE) -> &mut Self[src]

Indicates if labels should be hidden if they exceed the axis range. If false (the default) no bounds overlap analysis is performed. If true, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.

Default value: false.

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

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

pub fn label_flush<VALUE: Into<Label>>(&mut self, value: VALUE) -> &mut Self[src]

Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.

Default value: true for axis of a continuous x-scale. Otherwise, false.

pub fn label_flush_offset<VALUE: Into<f64>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of 2 will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.

Default value: 0.

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

The font of the tick label.

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

The font size of the label, in pixels.

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

Font style of the title.

pub fn label_font_weight<VALUE: Into<FontWeight>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Font weight of axis tick labels.

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

Maximum allowed pixel width of axis tick labels.

Default value: 180

pub fn label_opacity<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

The opacity of the labels.

pub fn label_overlap<VALUE: Into<LabelOverlap>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

The strategy to use for resolving overlap of axis labels. If false (the default), no overlap reduction is attempted. If set to true or "parity", a strategy of removing every other label is used (this works well for standard linear axes). If set to "greedy", a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).

Default value: true for non-nominal fields with non-log scales; "greedy" for log scales; otherwise false.

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

The padding, in pixels, between axis and text labels.

Default value: 2

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

Default value: true.

pub fn label_separation<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default 0). This property is ignored if labelOverlap resolution is not enabled.

pub fn max_extent<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.

Default value: undefined.

pub fn min_extent<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.

Default value: 30 for y-axis; undefined for x-axis.

pub fn orient<VALUE: Into<Orient>>(&mut self, value: VALUE) -> &mut Self[src]

The orientation of the axis. One of "top", "bottom", "left" or "right". The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).

Default value: "bottom" for x-axes and "left" for y-axes.

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

Whether month names and weekday names should be abbreviated.

Default value: false

pub fn tick_color<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self[src]

The color of the axis's tick.

Default value: "gray"

pub fn tick_dash<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self[src]

An array of alternating [stroke, space] lengths for dashed tick mark lines.

pub fn tick_dash_offset<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

The pixel offset at which to start drawing with the tick mark dash array.

pub fn tick_extra<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self[src]

Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for band scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with "bandPosition": 1 and an axis "padding" value of 0.

pub fn tick_offset<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

Position offset in pixels to apply to ticks, labels, and gridlines.

pub fn tick_opacity<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

Opacity of the ticks.

pub fn tick_round<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self[src]

Boolean flag indicating if pixel position values should be rounded to the nearest integer.

Default value: true

pub fn ticks<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self[src]

Boolean value that determines whether the axis should include ticks.

Default value: true

pub fn tick_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

The size in pixels of axis ticks.

Default value: 5

pub fn tick_width<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

The width, in pixels, of ticks.

Default value: 1

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

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

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

Horizontal text alignment of axis titles.

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

Text anchor position for placing axis titles.

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

Angle in degrees of axis titles.

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

Vertical text baseline for axis titles.

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

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

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

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

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

Font size of the title.

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

Font style of the title.

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

Font weight of the 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<f64>>(&mut self, value: VALUE) -> &mut Self[src]

Maximum allowed pixel width of axis titles.

pub fn title_opacity<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

Opacity of the axis title.

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

The padding, in pixels, between title and axis.

pub fn title_x<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

X-coordinate of the axis title relative to the axis group.

pub fn title_y<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self[src]

Y-coordinate of the axis title relative to the axis group.

pub fn build(&self) -> Result<AxisConfig, String>[src]

Builds a new AxisConfig.

Errors

If a required field has not been initialized.

Trait Implementations

impl Clone for AxisConfigBuilder[src]

impl Default for AxisConfigBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.