[−][src]Struct vega_lite_4::TickConfig
Tick-Specific Config
Fields
align: Option<Align>
The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One
of "left"
, "right"
, "center"
.
angle: Option<f64>
The rotation angle of the text, in degrees.
aspect: Option<bool>
Whether to keep aspect ratio of image marks.
band_size: Option<f64>
The width of the ticks.
Default value: 3/4 of step (width step for horizontal ticks and height step for vertical ticks).
baseline: Option<Baseline>
The vertical alignment of the text or ranged marks (area, bar, image, rect, rule). One of
"top"
, "middle"
, "bottom"
.
Default value: "middle"
color: Option<ColorUnion>
Default color.
Default value: ■ "#4682b4"
Note:
- This property cannot be used in a style config.
- The
fill
andstroke
properties have higher precedence thancolor
and will overridecolor
.
corner_radius: Option<f64>
The radius in pixels of rounded rectangle corners.
Default value: 0
corner_radius_bottom_left: Option<f64>
The radius in pixels of rounded rectangle bottom left corner.
Default value: 0
corner_radius_bottom_right: Option<f64>
The radius in pixels of rounded rectangle bottom right corner.
Default value: 0
corner_radius_top_left: Option<f64>
The radius in pixels of rounded rectangle top right corner.
Default value: 0
corner_radius_top_right: Option<f64>
The radius in pixels of rounded rectangle top left corner.
Default value: 0
cursor: Option<Cursor>
The mouse cursor used over the mark. Any valid CSS cursor type can be used.
dir: Option<Dir>
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"
dx: Option<f64>
The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
dy: Option<f64>
The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the angle property.
ellipsis: Option<String>
The ellipsis string for text truncated in response to the limit parameter.
Default value: "…"
fill: Option<FillUnion>
Default Fill Color. This has higher precedence than config.color
.
Default value: (None)
filled: Option<bool>
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.
fill_opacity: Option<f64>
The fill opacity (value between [0,1]).
Default value: 1
font: Option<String>
The typeface to set the text in (e.g., "Helvetica Neue"
).
font_size: Option<f64>
The font size, in pixels.
font_style: Option<String>
The font style (e.g., "italic"
).
font_weight: Option<FontWeight>
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
).
height: Option<f64>
Height of the marks.
href: Option<String>
A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
interpolate: Option<Interpolate>
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.
invalid: RemovableValue<Invalid>
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.
limit: Option<f64>
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
line_break: Option<String>
A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property will be ignored if the text property is array-valued.
line_height: Option<f64>
The height, in pixels, of each line of text in a multi-line text mark.
opacity: Option<f64>
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.
order: Option<bool>
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.
orient: Option<Orientation>
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.
radius: Option<f64>
Polar coordinate radial offset, in pixels, of the text label from the origin determined
by the x
and y
properties.
shape: Option<String>
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"
size: Option<f64>
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; width/height'sstep
2
for bar marks with discrete dimensions;5
for bar marks with continuous dimensions;11
for text marks.
stroke: Option<FillUnion>
Default Stroke Color. This has higher precedence than config.color
.
Default value: (None)
stroke_cap: Option<StrokeCap>
The stroke cap for line ending style. One of "butt"
, "round"
, or "square"
.
Default value: "square"
stroke_dash: Option<Vec<f64>>
An array of alternating stroke, space lengths for creating dashed or dotted lines.
stroke_dash_offset: Option<f64>
The offset (in pixels) into which to begin drawing with the stroke dash array.
stroke_join: Option<StrokeJoin>
The stroke line join method. One of "miter"
, "round"
or "bevel"
.
Default value: "miter"
stroke_miter_limit: Option<f64>
The miter limit at which to bevel a line join.
stroke_opacity: Option<f64>
The stroke opacity (value between [0,1]).
Default value: 1
stroke_width: Option<f64>
The stroke width, in pixels.
tension: Option<f64>
Depending on the interpolation type, sets the tension parameter (for line and area marks).
text: Option<PurpleText>
Placeholder text if the text
channel is not specified
theta: Option<f64>
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".
thickness: Option<f64>
Thickness of the tick mark.
Default value: 1
time_unit_band: Option<f64>
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.
time_unit_band_position: Option<f64>
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.
tooltip: Option<Value>
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. - If
tooltip
is{"content": "data"}
, then all fields that appear in the highlighted data point will be used. - If set to
null
orfalse
, then no tooltip will be used.
See the tooltip
documentation for
a detailed discussion about tooltip in Vega-Lite.
Default value: null
width: Option<f64>
Width of the marks.
x: Option<XUnion>
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.
x2: Option<XUnion>
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.
y: Option<YUnion>
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.
y2: Option<YUnion>
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.
Trait Implementations
impl Clone for TickConfig
[src]
fn clone(&self) -> TickConfig
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for TickConfig
[src]
impl Default for TickConfig
[src]
fn default() -> TickConfig
[src]
impl<'de> Deserialize<'de> for TickConfig
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for TickConfig
[src]
Auto Trait Implementations
impl RefUnwindSafe for TickConfig
impl Send for TickConfig
impl Sync for TickConfig
impl Unpin for TickConfig
impl UnwindSafe for TickConfig
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> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
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>,