[−][src]Struct vega_lite_3::MarkDefClassBuilder
Builder for MarkDefClass
.
Methods
impl MarkDefClassBuilder
[src]
pub fn def_box<VALUE: Into<DefBox>>(&mut self, value: VALUE) -> &mut Self
[src]
pub fn clip<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
[src]
Whether a composite mark be clipped to the enclosing group’s width and height.
Whether a mark be clipped to the enclosing group’s width and height.
pub fn color<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
Default color. Note that fill
and stroke
have higher precedence than color
and
will override color
.
Default value: ■ "#4682b4"
Note: This property cannot be used in a style config.
pub fn extent<VALUE: Into<BoxPlotDefExtent>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The extent of the whiskers. Available options include:
"min-max"
: min and max are the lower and upper whiskers respectively.- A number representing multiple of the interquartile range. This number will be multiplied by the IQR to determine whisker boundary, which spans from the smallest data to the largest data within the range [Q1 - k * IQR, Q3 + k * IQR] where Q1 and Q3 are the first and third quartiles while IQR is the interquartile range (Q3-Q1).
Default value: 1.5
.
The extent of the rule. Available options include:
"ci"
: Extend the rule to the confidence interval of the mean."stderr"
: The size of rule are set to the value of standard error, extending from the mean."stdev"
: The size of rule are set to the value of standard deviation, extending from the mean."iqr"
: Extend the rule to the q1 and q3.
Default value: "stderr"
.
The extent of the band. Available options include:
"ci"
: Extend the band to the confidence interval of the mean."stderr"
: The size of band are set to the value of standard error, extending from the mean."stdev"
: The size of band are set to the value of standard deviation, extending from the mean."iqr"
: Extend the band to the q1 and q3.
Default value: "stderr"
.
pub fn median<VALUE: Into<DefBox>>(&mut self, value: VALUE) -> &mut Self
[src]
pub fn opacity<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The opacity (value between [0,1]) of the mark.
The overall opacity (value between [0,1]).
Default value: 0.7
for non-aggregate plots with point
, tick
, circle
, or
square
marks or layered bar
charts and 1
otherwise.
pub fn orient<VALUE: Into<Orientation>>(&mut self, value: VALUE) -> &mut Self
[src]
Orientation of the box plot. This is normally automatically determined based on types of
fields on x and y channels. However, an explicit orient
be specified when the
orientation is ambiguous.
Default value: "vertical"
.
Orientation of the error bar. This is normally automatically determined, but can be specified when the orientation is ambiguous and cannot be automatically determined.
Orientation of the error band. This is normally automatically determined, but can be specified when the orientation is ambiguous and cannot be automatically determined.
The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.
- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.
- For area, this property determines the orient property of the Vega output.
- For line and trail marks, this property determines the sort order of the points in the
line
if
config.sortLineBy
is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored.
pub fn outliers<VALUE: Into<DefBox>>(&mut self, value: VALUE) -> &mut Self
[src]
pub fn rule<VALUE: Into<DefBox>>(&mut self, value: VALUE) -> &mut Self
[src]
pub fn size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Size of the box and median tick of a box plot
Default size for marks.
- For
point
/circle
/square
, this represents the pixel area of the marks. For example: in the case of circles, the radius is determined in part by the square root of the size value. - For
bar
, this represents the band size of the bar, in pixels. - For
text
, this represents the font size, in pixels.
Default value: 30
for point, circle, square marks; rangeStep
- 1 for bar marks
with discrete dimensions; 5
for bar marks with continuous dimensions; 11
for text
marks.
pub fn ticks<VALUE: Into<DefBox>>(&mut self, value: VALUE) -> &mut Self
[src]
pub fn def_type<VALUE: Into<Mark>>(&mut self, value: VALUE) -> &mut Self
[src]
The mark type. This could a primitive mark type
(one of "bar"
, "circle"
, "square"
, "tick"
, "line"
,
"area"
, "point"
, "geoshape"
, "rule"
, and "text"
)
or a composite mark type ("boxplot"
, "errorband"
, "errorbar"
).
pub fn band<VALUE: Into<DefBox>>(&mut self, value: VALUE) -> &mut Self
[src]
pub fn borders<VALUE: Into<DefBox>>(&mut self, value: VALUE) -> &mut Self
[src]
pub fn interpolate<VALUE: Into<Interpolate>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The line interpolation method for the error band. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes at the midpoint of each pair of adjacent x-values."step-before"
: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes before the x-value."step-after"
: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes after the x-value."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
The line interpolation method to use for line and area marks. One of the following:
"linear"
: piecewise linear segments, as in a polyline."linear-closed"
: close the linear segments to form a polygon."step"
: alternate between horizontal and vertical segments, as in a step function."step-before"
: alternate between vertical and horizontal segments, as in a step function."step-after"
: alternate between horizontal and vertical segments, as in a step function."basis"
: a B-spline, with control point duplication on the ends."basis-open"
: an open B-spline; may not intersect the start or end."basis-closed"
: a closed B-spline, as in a loop."cardinal"
: a Cardinal spline, with control point duplication on the ends."cardinal-open"
: an open Cardinal spline; may not intersect the start or end, but will intersect other control points."cardinal-closed"
: a closed Cardinal spline, as in a loop."bundle"
: equivalent to basis, except the tension parameter is used to straighten the spline."monotone"
: cubic interpolation that preserves monotonicity in y.
pub fn tension<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The tension parameter for the interpolation type of the error band.
Depending on the interpolation type, sets the tension parameter (for line and area marks).
pub fn align<VALUE: Into<Align>>(&mut self, value: VALUE) -> &mut Self
[src]
The horizontal alignment of the text. One of "left"
, "right"
, "center"
.
pub fn angle<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The rotation angle of the text, in degrees.
pub fn baseline<VALUE: Into<TextBaseline>>(&mut self, value: VALUE) -> &mut Self
[src]
The vertical alignment of the text. One of "top"
, "middle"
, "bottom"
.
Default value: "middle"
pub fn bin_spacing<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Offset between bars for binned field. Ideal value for this is either 0 (Preferred by statisticians) or 1 (Vega-Lite Default, D3 example style).
Default value: 1
pub fn corner_radius<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The radius in pixels of rounded rectangle corners.
Default value: 0
pub fn cursor<VALUE: Into<Cursor>>(&mut self, value: VALUE) -> &mut Self
[src]
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
pub fn dir<VALUE: Into<Dir>>(&mut self, value: VALUE) -> &mut Self
[src]
The direction of the text. One of "ltr"
(left-to-right) or "rtl"
(right-to-left).
This property determines on which side is truncated in response to the limit parameter.
Default value: "ltr"
pub fn dx<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
pub fn dy<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
pub fn ellipsis<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
The ellipsis string for text truncated in response to the limit parameter.
Default value: "…"
pub fn fill<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
Default Fill Color. This has higher precedence than config.color
Default value: (None)
pub fn filled<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
[src]
Whether the mark's color should be used as fill color instead of stroke color.
Default value: false
for point
, line
and rule
; otherwise, true
.
Note: This property cannot be used in a style config.
pub fn fill_opacity<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The fill opacity (value between [0,1]).
Default value: 1
pub fn font<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
The typeface to set the text in (e.g., "Helvetica Neue"
).
pub fn font_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The font size, in pixels.
pub fn font_style<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
The font style (e.g., "italic"
).
pub fn font_weight<VALUE: Into<FontWeight>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The font weight.
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 href<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
pub fn limit<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.
Default value: 0
, indicating no limit
pub fn line<VALUE: Into<Line>>(&mut self, value: VALUE) -> &mut Self
[src]
A flag for overlaying line on top of area marks, or an object defining the properties of the overlayed lines.
-
If this value is an empty object (
{}
) ortrue
, lines with default properties will be used. -
If this value is
false
, no lines would be automatically added to area marks.
Default value: false
.
pub fn order<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
[src]
For line and trail marks, this order
property can be set to null
or false
to make
the lines use the original order in the data sources.
pub fn point<VALUE: Into<PointUnion>>(&mut self, value: VALUE) -> &mut Self
[src]
A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.
-
If this property is
"transparent"
, transparent points will be used (for enhancing tooltips and selections). -
If this property is an empty object (
{}
) ortrue
, filled points with default properties will be used. -
If this property is
false
, no points would be automatically added to line or area marks.
Default value: false
.
pub fn radius<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Polar coordinate radial offset, in pixels, of the text label from the origin determined
by the x
and y
properties.
pub fn shape<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
Shape of the point marks. Supported values include:
- plotting shapes:
"circle"
,"square"
,"cross"
,"diamond"
,"triangle-up"
,"triangle-down"
,"triangle-right"
, or"triangle-left"
. - the line symbol
"stroke"
- centered directional shapes
"arrow"
,"wedge"
, or"triangle"
- a custom SVG path string (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 stroke<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
Default Stroke Color. This has higher precedence than config.color
Default value: (None)
pub fn stroke_cap<VALUE: Into<StrokeCap>>(&mut self, value: VALUE) -> &mut Self
[src]
The stroke cap for line ending style. One of "butt"
, "round"
, or "square"
.
Default value: "square"
pub fn stroke_dash<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self
[src]
An array of alternating stroke, space lengths for creating dashed or dotted lines.
pub fn stroke_dash_offset<VALUE: Into<f64>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The offset (in pixels) into which to begin drawing with the stroke dash array.
pub fn stroke_join<VALUE: Into<StrokeJoin>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The stroke line join method. One of "miter"
, "round"
or "bevel"
.
Default value: "miter"
pub fn stroke_miter_limit<VALUE: Into<f64>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The miter limit at which to bevel a line join.
pub fn stroke_opacity<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The stroke opacity (value between [0,1]).
Default value: 1
pub fn stroke_width<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The stroke width, in pixels.
pub fn style<VALUE: Into<Style>>(&mut self, value: VALUE) -> &mut Self
[src]
A string or array of strings indicating the name of custom styles to apply to the mark. A
style is a named collection of mark property defaults defined within the style
configuration. If style is
an array, later styles will override earlier styles. Any mark
properties explicitly
defined within the encoding
will override a style default.
Default value: The mark's name. For example, a bar mark will have style "bar"
by
default.
Note: Any specified style will augment the default style. For example, a bar mark
with "style": "foo"
will receive from config.style.bar
and config.style.foo
(the
specified style "foo"
has higher precedence).
pub fn text<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
[src]
Placeholder text if the text
channel is not specified
pub fn theta<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Polar coordinate angle, in radians, of the text label from the origin determined by the
x
and y
properties. Values for theta
follow the same convention of arc
mark
startAngle
and endAngle
properties: angles are measured in radians, with 0
indicating "north".
pub fn thickness<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Thickness of the tick mark.
Default value: 1
pub fn tooltip<VALUE: Into<Tooltip>>(&mut self, value: VALUE) -> &mut Self
[src]
The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.
- If
tooltip
is{"content": "encoding"}
, then all fields fromencoding
will be used. - If
tooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used. - If set to
null
, then no tooltip will be used.
pub fn x<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
X coordinates of the marks, or width of horizontal "bar"
and "area"
without x2
.
pub fn x2<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
X2 coordinates for ranged "area"
, "bar"
, "rect"
, and "rule"
.
pub fn x2_offset<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Offset for x2-position.
pub fn x_offset<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Offset for x-position.
pub fn y<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Y coordinates of the marks, or height of vertical "bar"
and "area"
without y2
pub fn y2<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Y2 coordinates for ranged "area"
, "bar"
, "rect"
, and "rule"
.
pub fn y2_offset<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Offset for y2-position.
pub fn y_offset<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Offset for y-position.
pub fn build(&self) -> Result<MarkDefClass, String>
[src]
Trait Implementations
impl Clone for MarkDefClassBuilder
[src]
fn clone(&self) -> MarkDefClassBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for MarkDefClassBuilder
[src]
fn default() -> MarkDefClassBuilder
[src]
Auto Trait Implementations
impl Send for MarkDefClassBuilder
impl Sync for MarkDefClassBuilder
impl Unpin for MarkDefClassBuilder
impl UnwindSafe for MarkDefClassBuilder
impl RefUnwindSafe for MarkDefClassBuilder
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,