Struct vega_lite_4::EncodingSortFieldBuilder
source · pub struct EncodingSortFieldBuilder { /* private fields */ }
Expand description
Builder for EncodingSortField
.
Implementations§
source§impl EncodingSortFieldBuilder
impl EncodingSortFieldBuilder
sourcepub fn field<VALUE: Into<Field>>(&mut self, value: VALUE) -> &mut Self
pub fn field<VALUE: Into<Field>>(&mut self, value: VALUE) -> &mut Self
The data field to sort by.
Default value: If unspecified, defaults to the field specified in the outer data reference.
sourcepub fn op<VALUE: Into<NonArgAggregateOp>>(&mut self, value: VALUE) -> &mut Self
pub fn op<VALUE: Into<NonArgAggregateOp>>(&mut self, value: VALUE) -> &mut Self
An aggregate operation to
perform on the field prior to sorting (e.g., "count"
, "mean"
and "median"
). An
aggregation is required when there are multiple values of the sort field for each encoded
data field. The input data objects will be aggregated, grouped by the encoded data
field.
For a full list of operations, please see the documentation for aggregate.
Default value: "sum"
for stacked plots. Otherwise, "min"
.
sourcepub fn order<VALUE: Into<RemovableValue<SortOrder>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn order<VALUE: Into<RemovableValue<SortOrder>>>( &mut self, value: VALUE ) -> &mut Self
The sort order. One of "ascending"
(default), "descending"
, or null
(no not sort).
sourcepub fn encoding<VALUE: Into<SortByChannel>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn encoding<VALUE: Into<SortByChannel>>( &mut self, value: VALUE ) -> &mut Self
The encoding channel to
sort by (e.g., "x"
, "y"
)
sourcepub fn build(&self) -> Result<EncodingSortField, EncodingSortFieldBuilderError>
pub fn build(&self) -> Result<EncodingSortField, EncodingSortFieldBuilderError>
Trait Implementations§
source§impl Clone for EncodingSortFieldBuilder
impl Clone for EncodingSortFieldBuilder
source§fn clone(&self) -> EncodingSortFieldBuilder
fn clone(&self) -> EncodingSortFieldBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for EncodingSortFieldBuilder
impl Send for EncodingSortFieldBuilder
impl Sync for EncodingSortFieldBuilder
impl Unpin for EncodingSortFieldBuilder
impl UnwindSafe for EncodingSortFieldBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more