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§

Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.