[−][src]Struct vega_lite_3::LegendConfigBuilder
Builder for LegendConfig
.
Methods
impl LegendConfigBuilder
[src]
pub fn clip_height<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The height in pixels to clip symbol legend entries and limit their size.
pub fn column_padding<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The horizontal padding in pixels between symbol legend entries.
Default value: 10
.
pub fn columns<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The number of columns in which to arrange symbol legend entries. A value of 0
or lower
indicates a single row with one column per entry.
pub fn corner_radius<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Corner radius for the full legend.
pub fn fill_color<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
Background fill color for the full legend.
pub fn gradient_direction<VALUE: Into<Orientation>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The default direction ("horizontal"
or "vertical"
) for gradient legends.
Default value: "vertical"
.
pub fn gradient_horizontal_max_length<VALUE: Into<f64>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Max legend length for a horizontal gradient when config.legend.gradientLength
is
undefined.
Default value: 200
pub fn gradient_horizontal_min_length<VALUE: Into<f64>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Min legend length for a horizontal gradient when config.legend.gradientLength
is
undefined.
Default value: 100
pub fn gradient_label_limit<VALUE: Into<f64>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The maximum allowed length in pixels of color ramp gradient labels.
pub fn gradient_label_offset<VALUE: Into<f64>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Vertical offset in pixels for color ramp gradient labels.
Default value: 2
.
pub fn gradient_length<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The length in pixels of the primary axis of a color gradient. This value corresponds to the height of a vertical gradient or the width of a horizontal gradient.
Default value: 200
.
pub fn gradient_opacity<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Opacity of the color gradient.
pub fn gradient_stroke_color<VALUE: Into<String>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The color of the gradient stroke, can be in hex color code or regular color name.
Default value: "lightGray"
.
pub fn gradient_stroke_width<VALUE: Into<f64>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The width of the gradient stroke, in pixels.
Default value: 0
.
pub fn gradient_thickness<VALUE: Into<f64>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The thickness in pixels of the color gradient. This value corresponds to the width of a vertical gradient or the height of a horizontal gradient.
Default value: 16
.
pub fn gradient_vertical_max_length<VALUE: Into<f64>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Max legend length for a vertical gradient when config.legend.gradientLength
is
undefined.
Default value: 200
pub fn gradient_vertical_min_length<VALUE: Into<f64>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Min legend length for a vertical gradient when config.legend.gradientLength
is
undefined.
Default value: 100
pub fn grid_align<VALUE: Into<LayoutAlign>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The alignment to apply to symbol legends rows and columns. The supported string values
are "all"
, "each"
(the default), and none
. For more information, see the grid
layout documentation.
Default value: "each"
.
pub fn label_align<VALUE: Into<Align>>(&mut self, value: VALUE) -> &mut Self
[src]
The alignment of the legend label, can be left, center, or right.
pub fn label_baseline<VALUE: Into<TextBaseline>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The position of the baseline of legend label, can be "top"
, "middle"
, "bottom"
, or
"alphabetic"
.
Default value: "middle"
.
pub fn label_color<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
The color of the legend label, can be in hex color code or regular color name.
pub fn label_font<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
The font of the legend label.
pub fn label_font_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The font size of legend label.
Default value: 10
.
pub fn label_font_style<VALUE: Into<String>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The font style of legend label.
pub fn label_font_weight<VALUE: Into<FontWeight>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The font weight of legend label.
pub fn label_limit<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Maximum allowed pixel width of legend tick labels.
Default value: 160
.
pub fn label_offset<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The offset of the legend label.
pub fn label_opacity<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Opacity of labels.
pub fn label_overlap<VALUE: Into<LabelOverlap>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The strategy to use for resolving overlap of labels in gradient legends. If false
, no
overlap reduction is attempted. If set to true
or "parity"
, a strategy of removing
every other label is used. If set to "greedy"
, a linear scan of the labels is
performed, removing any label that overlaps with the last visible label (this often works
better for log-scaled axes).
Default value: "greedy"
for log scales otherwise
true`.
pub fn label_padding<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Padding in pixels between the legend and legend labels.
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 layout<VALUE: Into<LegendLayout>>(&mut self, value: VALUE) -> &mut Self
[src]
Legend orient group layout parameters.
pub fn legend_x<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Custom x-position for legend with orient "none".
pub fn legend_y<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Custom y-position for legend with orient "none".
pub fn offset<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The offset in pixels by which to displace the legend from the data rectangle and axes.
Default value: 18
.
pub fn orient<VALUE: Into<LegendOrient>>(&mut self, value: VALUE) -> &mut Self
[src]
The orientation of the legend, which determines how the legend is positioned within the scene. One of "left", "right", "top-left", "top-right", "bottom-left", "bottom-right", "none".
Default value: "right"
pub fn padding<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The padding between the border and content of the legend group.
Default value: 0
.
pub fn row_padding<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The vertical padding in pixels between symbol legend entries.
Default value: 2
.
pub fn short_time_labels<VALUE: Into<bool>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Whether month names and weekday names should be abbreviated.
Default value: false
pub fn stroke_color<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
Border stroke color for the full legend.
pub fn stroke_dash<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self
[src]
Border stroke dash pattern for the full legend.
pub fn stroke_width<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Border stroke width for the full legend.
pub fn symbol_base_fill_color<VALUE: Into<String>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Default fill color for legend symbols. Only applied if there is no "fill"
scale color
encoding for the legend.
Default value: "transparent"
.
pub fn symbol_base_stroke_color<VALUE: Into<String>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Default stroke color for legend symbols. Only applied if there is no "fill"
scale color
encoding for the legend.
Default value: "gray"
.
pub fn symbol_dash<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self
[src]
An array of alternating [stroke, space] lengths for dashed symbol strokes.
pub fn symbol_dash_offset<VALUE: Into<f64>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The pixel offset at which to start drawing with the symbol stroke dash array.
pub fn symbol_direction<VALUE: Into<Orientation>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The default direction ("horizontal"
or "vertical"
) for symbol legends.
Default value: "vertical"
.
pub fn symbol_fill_color<VALUE: Into<String>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The color of the legend symbol,
pub fn symbol_offset<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Horizontal pixel offset for legend symbols.
Default value: 0
.
pub fn symbol_opacity<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Opacity of the legend symbols.
pub fn symbol_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The size of the legend symbol, in pixels.
Default value: 100
.
pub fn symbol_stroke_color<VALUE: Into<String>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Stroke color for legend symbols.
pub fn symbol_stroke_width<VALUE: Into<f64>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The width of the symbol's stroke.
Default value: 1.5
.
pub fn symbol_type<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
The symbol shape. One of the plotting shapes circle
(default), square
, cross
,
diamond
, triangle-up
, triangle-down
, triangle-right
, or triangle-left
, the line
symbol stroke
, or one of the centered directional shapes arrow
, wedge
, or
triangle
. Alternatively, a custom SVG path
string can be provided.
For correct sizing, custom shape paths should be defined within a square bounding box
with coordinates ranging from -1 to 1 along both the x and y dimensions.
Default value: "circle"
.
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<Align>>(&mut self, value: VALUE) -> &mut Self
[src]
Horizontal text alignment for legend titles.
Default value: "left"
.
pub fn title_anchor<VALUE: Into<TitleAnchor>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Text anchor position for placing legend titles.
pub fn title_baseline<VALUE: Into<TextBaseline>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Vertical text baseline for legend titles.
Default value: "top"
.
pub fn title_color<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
The color of the legend 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]
The font of the legend title.
pub fn title_font_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The font size of the legend title.
pub fn title_font_style<VALUE: Into<String>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The font style of the legend title.
pub fn title_font_weight<VALUE: Into<FontWeight>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The font weight of the legend 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 legend titles.
Default value: 180
.
pub fn title_opacity<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Opacity of the legend title.
pub fn title_orient<VALUE: Into<Orient>>(&mut self, value: VALUE) -> &mut Self
[src]
Orientation of the legend title.
pub fn title_padding<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The padding, in pixels, between title and legend.
Default value: 5
.
pub fn build(&self) -> Result<LegendConfig, String>
[src]
Trait Implementations
impl Clone for LegendConfigBuilder
[src]
fn clone(&self) -> LegendConfigBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for LegendConfigBuilder
[src]
fn default() -> LegendConfigBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for LegendConfigBuilder
impl Send for LegendConfigBuilder
impl Sync for LegendConfigBuilder
impl Unpin for LegendConfigBuilder
impl UnwindSafe for LegendConfigBuilder
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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,