[][src]Struct vega_lite_4::AxisBuilder

pub struct AxisBuilder { /* fields omitted */ }

Builder for Axis.

Implementations

impl AxisBuilder[src]

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

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

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

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

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

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

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

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

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

pub fn domain_width<VALUE: Into<CornerRadiusUnion>>(
    &mut self,
    value: VALUE
) -> &mut Self
[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.

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 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_cap<VALUE: Into<Cap>>(&mut self, value: VALUE) -> &mut Self[src]

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

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

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

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

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

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

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

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

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

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

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 axis's backing datum object.

pub fn label_flush<VALUE: Into<LabelFlush>>(
    &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<CornerRadiusUnion>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

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

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

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

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

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

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

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

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

pub fn label_overlap<VALUE: Into<LabelOverlapUnion>>(
    &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<GridDashOffsetUnion>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

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

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

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

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

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

The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.

Default value: derived from the axis config's offset (0 by default)

pub fn orient<VALUE: Into<TitleOrientUnion>>(
    &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 position<VALUE: Into<CornerRadiusUnion>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

The anchor position of the axis in pixels. For x-axes with top or bottom orientation, this sets the axis group x coordinate. For y-axes with left or right orientation, this sets the axis group y coordinate.

Default value: 0

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

A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the style configuration. If style is an array, later styles will override earlier styles.

Default value: (none) Note: Any specified style will augment the default style. For example, an x-axis mark with "style": "foo" will use config.axisX and config.style.foo (the specified style "foo" has higher precedence).

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

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

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

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

A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are "nice" (multiples of 2, 5, 10) and lie within the underlying scale's range.

For scales of type "time" or "utc", the tick count can instead be a time interval specifier. Legal string values are "millisecond", "second", "minute", "hour", "day", "week", "month", and "year". Alternatively, an object-valued interval specifier of the form {"interval": "month", "step": 3} includes a desired number of interval steps. Here, ticks are generated for each quarter (Jan, Apr, Jul, Oct) boundary.

Default value: Determine using a formula ceil(width/40) for x and ceil(height/40) for y.

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

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

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

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

The minimum desired step between axis ticks, in terms of scale domain values. For example, a value of 1 indicates that ticks should not be less than 1 unit apart. If tickMinStep is specified, the tickCount value will be adjusted, if necessary, to enforce the minimum step value.

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

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

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

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

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

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

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

A title for the field. If null, the title will be removed.

Default value: derived from the field's name and transformation function (aggregate, bin and timeUnit). If the field has an aggregate function, the function is displayed as part of the title (e.g., "Sum of Profit"). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., "Profit (binned)", "Transaction Date (year-month)"). Otherwise, the title is simply the field name.

Notes:

  1. You can customize the default field title format by providing the fieldTitle property in the config or fieldTitle function via the compile function's options.

  2. If both field definition's title and axis, header, or legend title are defined, axis/header/legend title will be used.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Explicitly set the visible axis tick values.

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

A non-negative integer indicating the z-index of the axis. If zindex is 0, axes should be drawn behind all chart elements. To put them in front, set zindex to 1 or more.

Default value: 0 (behind the marks).

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

Builds a new Axis.

Errors

If a required field has not been initialized.

Trait Implementations

impl Clone for AxisBuilder[src]

impl Default for AxisBuilder[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.