Struct vega_lite::EncodingSortField
source · pub struct EncodingSortField {
pub field: Option<Field>,
pub op: AggregateOp,
pub order: Option<VgComparatorOrder>,
}
Expand description
A sort definition for sorting a discrete scale in an encoding field definition.
Fields§
§field: Option<Field>
The data field to sort by.
Default value: If unspecified, defaults to the field specified in the outer data reference.
op: AggregateOp
An aggregate operation to
perform on the field prior to sorting (e.g., "count"
, "mean"
and "median"
).
This property is required in cases where the sort field and the data reference field do
not match.
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.
order: Option<VgComparatorOrder>
The sort order. One of "ascending"
(default), "descending"
, or null
(no not sort).
Trait Implementations§
source§impl Debug for EncodingSortField
impl Debug for EncodingSortField
source§impl<'de> Deserialize<'de> for EncodingSortField
impl<'de> Deserialize<'de> for EncodingSortField
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more