[−][src]Struct vega_lite_4::StyleValueBuilder
Builder for StyleValue
.
Implementations
impl StyleValueBuilder
[src]
pub fn align<VALUE: Into<TitleAlignUnion>>(&mut self, value: VALUE) -> &mut Self
[src]
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One
of "left"
, "right"
, "center"
.
Note: Expression reference is not supported for range marks.
pub fn angle<VALUE: Into<Angle>>(&mut self, value: VALUE) -> &mut Self
[src]
The rotation angle of the text, in degrees.
pub fn aria<VALUE: Into<Aria>>(&mut self, value: VALUE) -> &mut Self
[src]
A boolean flag indicating if ARIA
attributes should be
included (SVG output only). If false
, the "aria-hidden" attribute will be set on the
output SVG element, removing the mark item from the ARIA accessibility tree.
pub fn aria_role<VALUE: Into<Color>>(&mut self, value: VALUE) -> &mut Self
[src]
Sets the type of user interface element of the mark item for ARIA accessibility (SVG output only). If specified, this property determines the "role" attribute. Warning: this property is experimental and may be changed in the future.
pub fn aria_role_description<VALUE: Into<Color>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
A human-readable, author-localized description for the role of the mark item for ARIA accessibility (SVG output only). If specified, this property determines the "aria-roledescription" attribute. Warning: this property is experimental and may be changed in the future.
pub fn aspect<VALUE: Into<Aria>>(&mut self, value: VALUE) -> &mut Self
[src]
Whether to keep aspect ratio of image marks.
pub fn baseline<VALUE: Into<TextBaseline>>(&mut self, value: VALUE) -> &mut Self
[src]
For text marks, the vertical text baseline. One of "alphabetic"
(default), "top"
,
"middle"
, "bottom"
, "line-top"
, "line-bottom"
, or an expression reference that
provides one of the valid values. The "line-top"
and "line-bottom"
values operate
similarly to "top"
and "bottom"
, but are calculated relative to the lineHeight
rather than fontSize
alone.
For range marks, the vertical alignment of the marks. One of "top"
, "middle"
,
"bottom"
.
Note: Expression reference is not supported for range marks.
pub fn bin_spacing<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Offset between bars for binned field. The ideal value for this is either 0 (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).
Default value: 1
pub fn blend<VALUE: Into<BlendUnion>>(&mut self, value: VALUE) -> &mut Self
[src]
The color blend mode for drawing an item on its current background. Any valid CSS mix-blend-mode value can be used.
__Default value: "source-over"
pub fn color<VALUE: Into<StyleColor>>(&mut self, value: VALUE) -> &mut Self
[src]
Default color.
Default value: ■ "#4682b4"
Note: - This property cannot be used in a style
config. - The fill
and
stroke
properties have higher precedence than color
and will override color
.
pub fn continuous_band_size<VALUE: Into<f64>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The default size of the bars on continuous scales.
Default value: 5
pub fn corner_radius<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The radius in pixels of rounded rectangles or arcs' corners.
Default value: 0
pub fn corner_radius_bottom_left<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The radius in pixels of rounded rectangles' bottom left corner.
Default value: 0
pub fn corner_radius_bottom_right<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The radius in pixels of rounded rectangles' bottom right corner.
Default value: 0
pub fn corner_radius_top_left<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The radius in pixels of rounded rectangles' top right corner.
Default value: 0
pub fn corner_radius_top_right<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The radius in pixels of rounded rectangles' top left corner.
Default value: 0
pub fn cursor<VALUE: Into<CursorUnion>>(&mut self, value: VALUE) -> &mut Self
[src]
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
pub fn description<VALUE: Into<Color>>(&mut self, value: VALUE) -> &mut Self
[src]
A text description of the mark item for ARIA accessibility (SVG output only). If specified, this property determines the "aria-label" attribute.
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 discrete_band_size<VALUE: Into<f64>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The default size of the bars with discrete dimensions. If unspecified, the default size
is step-2
, which provides 2 pixel offset between bars.
pub fn dx<VALUE: Into<CornerRadiusUnion>>(&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<CornerRadiusUnion>>(&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<Color>>(&mut self, value: VALUE) -> &mut Self
[src]
The ellipsis string for text truncated in response to the limit parameter.
Default value: "…"
pub fn end_angle<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The end angle in radians for arc marks. A value of 0
indicates up (north), increasing
values proceed clockwise.
pub fn fill<VALUE: Into<StyleFill>>(&mut self, value: VALUE) -> &mut Self
[src]
Default fill color. This property has higher precedence than config.color
. Set to
null
to remove fill.
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 all point
, line
, and rule
marks as well as
geoshape
marks for
graticule
data sources;
otherwise, true
.
Note: This property cannot be used in a style config.
pub fn fill_opacity<VALUE: Into<Opacity>>(&mut self, value: VALUE) -> &mut Self
[src]
The fill opacity (value between [0,1]).
Default value: 1
pub fn font<VALUE: Into<Color>>(&mut self, value: VALUE) -> &mut Self
[src]
The typeface to set the text in (e.g., "Helvetica Neue"
).
pub fn font_size<VALUE: Into<FontSize>>(&mut self, value: VALUE) -> &mut Self
[src]
The font size, in pixels.
Default value: 11
pub fn font_style<VALUE: Into<Color>>(&mut self, value: VALUE) -> &mut Self
[src]
The font style (e.g., "italic"
).
pub fn font_weight<VALUE: Into<FontWeightUnion>>(
&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 height<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Height of the marks.
pub fn href<VALUE: Into<Color>>(&mut self, value: VALUE) -> &mut Self
[src]
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
pub fn inner_radius<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The inner radius in pixels of arc marks. innerRadius
is an alias for radius2
.
pub fn interpolate<VALUE: Into<MarkConfigExprOrSignalRefInterpolate>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
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 invalid<VALUE: Into<RemovableValue<Invalid>>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Defines how Vega-Lite should handle marks for invalid values (null
and NaN
). - If set
to "filter"
(default), all data items with null values will be skipped (for line,
trail, and area marks) or filtered (for other marks). - If null
, all data items are
included. In this case, invalid values will be interpreted as zeroes.
pub fn limit<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
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_break<VALUE: Into<Color>>(&mut self, value: VALUE) -> &mut Self
[src]
A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.
pub fn line_height<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.
pub fn opacity<VALUE: Into<Opacity>>(&mut self, value: VALUE) -> &mut Self
[src]
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 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 orient<VALUE: Into<StyleOrient>>(&mut self, value: VALUE) -> &mut Self
[src]
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.
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 outer_radius<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The outer radius in pixels of arc marks. outerRadius
is an alias for radius
.
pub fn pad_angle<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The angular padding applied to sides of the arc, in radians.
pub fn radius<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
For arc mark, the primary (outer) radius in pixels.
For text marks, polar coordinate radial offset, in pixels, of the text from the origin
determined by the x
and y
properties.
pub fn radius2<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The secondary (inner) radius in pixels of arc marks.
pub fn shape<VALUE: Into<Color>>(&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 size<VALUE: Into<FontSize>>(&mut self, value: VALUE) -> &mut Self
[src]
Default size for marks. - For point
/circle
/square
, this represents the pixel area
of the marks. Note that this value sets the area of the symbol; the side lengths will
increase with the square root of this 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; width/height's step
- 2
for bar marks with discrete dimensions; - 5
for bar marks with continuous dimensions; -
11
for text marks.
pub fn smooth<VALUE: Into<Aria>>(&mut self, value: VALUE) -> &mut Self
[src]
A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.
pub fn start_angle<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The start angle in radians for arc marks. A value of 0
indicates up (north), increasing
values proceed clockwise.
pub fn stroke<VALUE: Into<StyleFill>>(&mut self, value: VALUE) -> &mut Self
[src]
Default stroke color. This property has higher precedence than config.color
. Set to
null
to remove stroke.
Default value: (None)
pub fn stroke_cap<VALUE: Into<Cap>>(&mut self, value: VALUE) -> &mut Self
[src]
The stroke cap for line ending style. One of "butt"
, "round"
, or "square"
.
Default value: "butt"
pub fn stroke_dash<VALUE: Into<StrokeDashUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
An array of alternating stroke, space lengths for creating dashed or dotted lines.
pub fn stroke_dash_offset<VALUE: Into<CornerRadiusUnion>>(
&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<StrokeJoinUnion>>(
&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<CornerRadiusUnion>>(
&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_offset<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.
pub fn stroke_opacity<VALUE: Into<Opacity>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The stroke opacity (value between [0,1]).
Default value: 1
pub fn stroke_width<VALUE: Into<FontSize>>(&mut self, value: VALUE) -> &mut Self
[src]
The stroke width, in pixels.
pub fn tension<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Depending on the interpolation type, sets the tension parameter (for line and area marks).
pub fn text<VALUE: Into<ConditionalPredicateValueDefTextExprRefText>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Text-Specific Config
Placeholder text if the text
channel is not specified
pub fn theta<VALUE: Into<Angle>>(&mut self, value: VALUE) -> &mut Self
[src]
-
For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)
-
For text marks, polar coordinate angle in radians.
pub fn theta2<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise.
pub fn time_unit_band<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Default relative band size for a time unit. If set to 1
, the bandwidth of the marks
will be equal to the time unit band step. If set to 0.5
, bandwidth of the marks will be
half of the time unit band step.
pub fn time_unit_band_position<VALUE: Into<f64>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Default relative band position for a time unit. If set to 0
, the marks will be
positioned at the beginning of the time unit band step. If set to 0.5
, the marks will
be positioned in the middle of the time unit band step.
pub fn tooltip<VALUE: Into<StyleTooltip>>(&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
istrue
or{"content": "encoding"}
, then all fields fromencoding
will be used. - Iftooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used. - If set tonull
orfalse
, then no tooltip will be used.
See the tooltip
documentation for
a detailed discussion about tooltip in Vega-Lite.
Default value: null
pub fn url<VALUE: Into<Color>>(&mut self, value: VALUE) -> &mut Self
[src]
The URL of the image file for image marks.
pub fn width<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
Width of the marks.
pub fn x<VALUE: Into<XUnion>>(&mut self, value: VALUE) -> &mut Self
[src]
X coordinates of the marks, or width of horizontal "bar"
and "area"
without specified
x2
or width
.
The value
of this channel can be a number or a string "width"
for the width of the
plot.
pub fn x2<VALUE: Into<XUnion>>(&mut self, value: VALUE) -> &mut Self
[src]
X2 coordinates for ranged "area"
, "bar"
, "rect"
, and "rule"
.
The value
of this channel can be a number or a string "width"
for the width of the
plot.
pub fn y<VALUE: Into<YUnion>>(&mut self, value: VALUE) -> &mut Self
[src]
Y coordinates of the marks, or height of vertical "bar"
and "area"
without specified
y2
or height
.
The value
of this channel can be a number or a string "height"
for the height of the
plot.
pub fn y2<VALUE: Into<YUnion>>(&mut self, value: VALUE) -> &mut Self
[src]
Y2 coordinates for ranged "area"
, "bar"
, "rect"
, and "rule"
.
The value
of this channel can be a number or a string "height"
for the height of the
plot.
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
.
Line-Specific Config
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
.
Point-Specific Config
pub fn corner_radius_end<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
- For vertical bars, top-left and top-right corner radius. - For horizontal bars, top-right and bottom-right corner radius.
pub fn band_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
The width of the ticks.
Default value: 3/4 of step (width step for horizontal ticks and height step for vertical ticks).
pub fn thickness<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
[src]
Thickness of the tick mark.
Default value: 1
pub fn band_position<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
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]
&mut self,
value: VALUE
) -> &mut Self
pub fn domain_dash_offset<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn domain_opacity<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn domain_width<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
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 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]
&mut self,
value: VALUE
) -> &mut Self
pub fn grid_dash<VALUE: Into<AxisGridDash>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn grid_dash_offset<VALUE: Into<GridDashOffsetUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn grid_opacity<VALUE: Into<GridOpacityUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn grid_width<VALUE: Into<GridWidthUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn label_align<VALUE: Into<ConditionalAxisPropertyAlignNull>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn label_angle<VALUE: Into<LabelAngle>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn label_baseline<VALUE: Into<PurpleTextBaseline>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
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]
&mut self,
value: VALUE
) -> &mut Self
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]
&mut self,
value: VALUE
) -> &mut Self
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]
&mut self,
value: VALUE
) -> &mut Self
pub fn label_font<VALUE: Into<ConditionalAxisPropertyStringNull>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn label_font_size<VALUE: Into<GridWidthUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn label_font_style<VALUE: Into<ConditionalAxisPropertyFontStyleNull>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn label_font_weight<VALUE: Into<FontWeight>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn label_limit<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn label_line_height<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn label_offset<VALUE: Into<GridDashOffsetUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn label_opacity<VALUE: Into<GridDashOffsetUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn label_overlap<VALUE: Into<LabelOverlapUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
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]
&mut self,
value: VALUE
) -> &mut Self
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]
&mut self,
value: VALUE
) -> &mut Self
pub fn max_extent<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn min_extent<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
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 position<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
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]
&mut self,
value: VALUE
) -> &mut Self
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]
&mut self,
value: VALUE
) -> &mut Self
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]
&mut self,
value: VALUE
) -> &mut Self
pub fn tick_dash_offset<VALUE: Into<GridDashOffsetUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
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]
&mut self,
value: VALUE
) -> &mut Self
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]
&mut self,
value: VALUE
) -> &mut Self
pub fn tick_opacity<VALUE: Into<GridDashOffsetUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
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]
&mut self,
value: VALUE
) -> &mut Self
pub fn tick_width<VALUE: Into<GridWidthUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn title<VALUE: Into<RemovableValue<LegendText>>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
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:
-
You can customize the default field title format by providing the
fieldTitle
property in the config orfieldTitle
function via thecompile
function's options. -
If both field definition's
title
and axis, header, or legendtitle
are defined, axis/header/legend title will be used.
pub fn title_align<VALUE: Into<TitleAlignUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn title_anchor<VALUE: Into<TitleAnchorUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn title_angle<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn title_baseline<VALUE: Into<TextBaseline>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
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]
&mut self,
value: VALUE
) -> &mut Self
pub fn title_font_style<VALUE: Into<Color>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn title_font_weight<VALUE: Into<FontWeightUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
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]
&mut self,
value: VALUE
) -> &mut Self
pub fn title_opacity<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn title_padding<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn title_x<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn title_y<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
pub fn translate<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
[src]
&mut self,
value: VALUE
) -> &mut Self
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<StyleValue, String>
[src]
Trait Implementations
impl Clone for StyleValueBuilder
[src]
pub fn clone(&self) -> StyleValueBuilder
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for StyleValueBuilder
[src]
pub fn default() -> StyleValueBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for StyleValueBuilder
[src]
impl Send for StyleValueBuilder
[src]
impl Sync for StyleValueBuilder
[src]
impl Unpin for StyleValueBuilder
[src]
impl UnwindSafe for StyleValueBuilder
[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>,