Struct vega_lite_4::EdEncodingBuilder
source · pub struct EdEncodingBuilder { /* private fields */ }
Expand description
Builder for EdEncoding
.
Implementations§
source§impl EdEncodingBuilder
impl EdEncodingBuilder
sourcepub fn angle<VALUE: Into<AngleClass>>(&mut self, value: VALUE) -> &mut Self
pub fn angle<VALUE: Into<AngleClass>>(&mut self, value: VALUE) -> &mut Self
Rotation angle of point and text marks.
sourcepub fn color<VALUE: Into<ColorClass>>(&mut self, value: VALUE) -> &mut Self
pub fn color<VALUE: Into<ColorClass>>(&mut self, value: VALUE) -> &mut Self
Color of the marks – either fill or stroke color based on the filled
property of mark
definition. By default, color
represents fill color for "area"
, "bar"
, "tick"
,
"text"
, "trail"
, "circle"
, and "square"
/ stroke color for "line"
and
"point"
.
Default value: If undefined, the default color depends on mark
config’s color
property.
Note: 1) For fine-grained control over both fill and stroke colors of the marks, please
use the fill
and stroke
channels. The fill
or stroke
encodings have higher
precedence than color
, thus may override the color
encoding if conflicting encodings
are specified. 2) See the scale documentation for more information about customizing
color scheme.
sourcepub fn column<VALUE: Into<RowColumnEncodingFieldDef>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn column<VALUE: Into<RowColumnEncodingFieldDef>>( &mut self, value: VALUE ) -> &mut Self
A field definition for the horizontal facet of trellis plots.
sourcepub fn description<VALUE: Into<DescriptionClass>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn description<VALUE: Into<DescriptionClass>>( &mut self, value: VALUE ) -> &mut Self
A text description of this mark for ARIA accessibility (SVG output only). For SVG output
the "aria-label"
attribute will be set to this description.
sourcepub fn detail<VALUE: Into<Detail>>(&mut self, value: VALUE) -> &mut Self
pub fn detail<VALUE: Into<Detail>>(&mut self, value: VALUE) -> &mut Self
Additional levels of detail for grouping data in aggregate views and in line, trail, and area marks without mapping data to a specific visual channel.
sourcepub fn facet<VALUE: Into<FacetEncodingFieldDef>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn facet<VALUE: Into<FacetEncodingFieldDef>>( &mut self, value: VALUE ) -> &mut Self
A field definition for the (flexible) facet of trellis plots.
If either row
or column
is specified, this channel will be ignored.
sourcepub fn fill<VALUE: Into<FillClass>>(&mut self, value: VALUE) -> &mut Self
pub fn fill<VALUE: Into<FillClass>>(&mut self, value: VALUE) -> &mut Self
Fill color of the marks. Default value: If undefined, the default color depends on
mark config’s color
property.
Note: The fill
encoding has higher precedence than color
, thus may override the
color
encoding if conflicting encodings are specified.
sourcepub fn fill_opacity<VALUE: Into<FillOpacityClass>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn fill_opacity<VALUE: Into<FillOpacityClass>>( &mut self, value: VALUE ) -> &mut Self
Fill opacity of the marks.
Default value: If undefined, the default opacity depends on mark
config’s fillOpacity
property.
sourcepub fn href<VALUE: Into<HrefClass>>(&mut self, value: VALUE) -> &mut Self
pub fn href<VALUE: Into<HrefClass>>(&mut self, value: VALUE) -> &mut Self
A URL to load upon mouse click.
sourcepub fn key<VALUE: Into<KeyClass>>(&mut self, value: VALUE) -> &mut Self
pub fn key<VALUE: Into<KeyClass>>(&mut self, value: VALUE) -> &mut Self
A data field to use as a unique key for data binding. When a visualization’s data is updated, the key value will be used to match data elements to existing mark instances. Use a key channel to enable object constancy for transitions over dynamic data.
sourcepub fn latitude<VALUE: Into<LatitudeClass>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn latitude<VALUE: Into<LatitudeClass>>( &mut self, value: VALUE ) -> &mut Self
Latitude position of geographically projected marks.
sourcepub fn latitude2<VALUE: Into<Latitude2Class>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn latitude2<VALUE: Into<Latitude2Class>>( &mut self, value: VALUE ) -> &mut Self
Latitude-2 position for geographically projected ranged "area"
, "bar"
, "rect"
, and
"rule"
.
sourcepub fn longitude<VALUE: Into<LongitudeClass>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn longitude<VALUE: Into<LongitudeClass>>( &mut self, value: VALUE ) -> &mut Self
Longitude position of geographically projected marks.
sourcepub fn longitude2<VALUE: Into<Longitude2Class>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn longitude2<VALUE: Into<Longitude2Class>>( &mut self, value: VALUE ) -> &mut Self
Longitude-2 position for geographically projected ranged "area"
, "bar"
, "rect"
,
and "rule"
.
sourcepub fn opacity<VALUE: Into<OpacityClass>>(&mut self, value: VALUE) -> &mut Self
pub fn opacity<VALUE: Into<OpacityClass>>(&mut self, value: VALUE) -> &mut Self
Opacity of the marks.
Default value: If undefined, the default opacity depends on mark
config’s opacity
property.
sourcepub fn order<VALUE: Into<Order>>(&mut self, value: VALUE) -> &mut Self
pub fn order<VALUE: Into<Order>>(&mut self, value: VALUE) -> &mut Self
Order of the marks. - For stacked marks, this order
channel encodes stack
order. - For line and trail
marks, this order
channel encodes order of data points in the lines. This can be useful
for creating a connected
scatterplot.
Setting order
to {"value": null}
makes the line marks use the original order in the
data sources. - Otherwise, this order
channel encodes layer order of the marks.
Note: In aggregate plots, order
field should be aggregate
d to avoid creating
additional aggregation grouping.
sourcepub fn radius<VALUE: Into<RadiusClass>>(&mut self, value: VALUE) -> &mut Self
pub fn radius<VALUE: Into<RadiusClass>>(&mut self, value: VALUE) -> &mut Self
The outer radius in pixels of arc marks.
sourcepub fn radius2<VALUE: Into<Radius2Class>>(&mut self, value: VALUE) -> &mut Self
pub fn radius2<VALUE: Into<Radius2Class>>(&mut self, value: VALUE) -> &mut Self
The inner radius in pixels of arc marks.
sourcepub fn row<VALUE: Into<RowColumnEncodingFieldDef>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn row<VALUE: Into<RowColumnEncodingFieldDef>>( &mut self, value: VALUE ) -> &mut Self
A field definition for the vertical facet of trellis plots.
sourcepub fn shape<VALUE: Into<MarkPropDefStringNullTypeForShape>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn shape<VALUE: Into<MarkPropDefStringNullTypeForShape>>( &mut self, value: VALUE ) -> &mut Self
Shape of the mark.
-
For
point
marks the 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.) -
For
geoshape
marks it should be a field definition of the geojson data
Default value: If undefined, the default shape depends on mark
config’s shape
property. ("circle"
if unset.)
sourcepub fn size<VALUE: Into<SizeClass>>(&mut self, value: VALUE) -> &mut Self
pub fn size<VALUE: Into<SizeClass>>(&mut self, value: VALUE) -> &mut Self
Size of the mark. - For "point"
, "square"
and "circle"
, – the symbol size, or pixel
area of the mark. - For "bar"
and "tick"
– the bar and tick’s size. - For "text"
–
the text’s font size. - Size is unsupported for "line"
, "area"
, and "rect"
. (Use
"trail"
instead of line with varying size)
sourcepub fn stroke<VALUE: Into<StrokeClass>>(&mut self, value: VALUE) -> &mut Self
pub fn stroke<VALUE: Into<StrokeClass>>(&mut self, value: VALUE) -> &mut Self
Stroke color of the marks. Default value: If undefined, the default color depends on
mark config’s color
property.
Note: The stroke
encoding has higher precedence than color
, thus may override the
color
encoding if conflicting encodings are specified.
sourcepub fn stroke_dash<VALUE: Into<MarkPropDefNumber>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn stroke_dash<VALUE: Into<MarkPropDefNumber>>( &mut self, value: VALUE ) -> &mut Self
Stroke dash of the marks.
Default value: [1,0]
(No dash).
sourcepub fn stroke_opacity<VALUE: Into<StrokeOpacityClass>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn stroke_opacity<VALUE: Into<StrokeOpacityClass>>( &mut self, value: VALUE ) -> &mut Self
Stroke opacity of the marks.
Default value: If undefined, the default opacity depends on mark
config’s strokeOpacity
property.
sourcepub fn stroke_width<VALUE: Into<StrokeWidthClass>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn stroke_width<VALUE: Into<StrokeWidthClass>>( &mut self, value: VALUE ) -> &mut Self
Stroke width of the marks.
Default value: If undefined, the default stroke width depends on mark
config’s strokeWidth
property.
sourcepub fn theta<VALUE: Into<ThetaClass>>(&mut self, value: VALUE) -> &mut Self
pub fn theta<VALUE: Into<ThetaClass>>(&mut self, value: VALUE) -> &mut Self
-
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.
sourcepub fn theta2<VALUE: Into<Theta2Class>>(&mut self, value: VALUE) -> &mut Self
pub fn theta2<VALUE: Into<Theta2Class>>(&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.
sourcepub fn tooltip<VALUE: Into<EncodingTooltip>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn tooltip<VALUE: Into<EncodingTooltip>>( &mut self, value: VALUE ) -> &mut Self
The tooltip text to show upon mouse hover. Specifying tooltip
encoding overrides the
tooltip
property in the mark
definition.
See the tooltip
documentation for
a detailed discussion about tooltip in Vega-Lite.
sourcepub fn url<VALUE: Into<UrlClass>>(&mut self, value: VALUE) -> &mut Self
pub fn url<VALUE: Into<UrlClass>>(&mut self, value: VALUE) -> &mut Self
The URL of an image mark.
sourcepub fn x<VALUE: Into<XClass>>(&mut self, value: VALUE) -> &mut Self
pub fn x<VALUE: Into<XClass>>(&mut self, value: VALUE) -> &mut Self
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.
sourcepub fn x2<VALUE: Into<X2Class>>(&mut self, value: VALUE) -> &mut Self
pub fn x2<VALUE: Into<X2Class>>(&mut self, value: VALUE) -> &mut Self
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.
sourcepub fn x_error<VALUE: Into<XErrorClass>>(&mut self, value: VALUE) -> &mut Self
pub fn x_error<VALUE: Into<XErrorClass>>(&mut self, value: VALUE) -> &mut Self
Error value of x coordinates for error specified "errorbar"
and "errorband"
.
sourcepub fn x_error2<VALUE: Into<XError2Class>>(&mut self, value: VALUE) -> &mut Self
pub fn x_error2<VALUE: Into<XError2Class>>(&mut self, value: VALUE) -> &mut Self
Secondary error value of x coordinates for error specified "errorbar"
and "errorband"
.
sourcepub fn y<VALUE: Into<YClass>>(&mut self, value: VALUE) -> &mut Self
pub fn y<VALUE: Into<YClass>>(&mut self, value: VALUE) -> &mut Self
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.
sourcepub fn y2<VALUE: Into<Y2Class>>(&mut self, value: VALUE) -> &mut Self
pub fn y2<VALUE: Into<Y2Class>>(&mut self, value: VALUE) -> &mut Self
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.
sourcepub fn y_error<VALUE: Into<YErrorClass>>(&mut self, value: VALUE) -> &mut Self
pub fn y_error<VALUE: Into<YErrorClass>>(&mut self, value: VALUE) -> &mut Self
Error value of y coordinates for error specified "errorbar"
and "errorband"
.
sourcepub fn y_error2<VALUE: Into<YError2Class>>(&mut self, value: VALUE) -> &mut Self
pub fn y_error2<VALUE: Into<YError2Class>>(&mut self, value: VALUE) -> &mut Self
Secondary error value of y coordinates for error specified "errorbar"
and "errorband"
.
sourcepub fn build(&self) -> Result<EdEncoding, EdEncodingBuilderError>
pub fn build(&self) -> Result<EdEncoding, EdEncodingBuilderError>
Trait Implementations§
source§impl Clone for EdEncodingBuilder
impl Clone for EdEncodingBuilder
source§fn clone(&self) -> EdEncodingBuilder
fn clone(&self) -> EdEncodingBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more