[−][src]Enum vega_lite_3::NiceUnion
Extending the domain so that it starts and ends on nice round values. This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. Nicing is useful if the domain is computed from data and may be irregular. For example, for a domain of [0.201479…, 0.996679…], a nice domain might be [0.2, 1.0].
For quantitative scales such as linear, nice
can be either a boolean flag or a number.
If nice
is a number, it will represent a desired tick count. This allows greater
control over the step size used to extend the bounds, guaranteeing that the returned
ticks will exactly cover the domain.
For temporal fields with time and utc scales, the nice
value can be a string indicating
the desired time interval. Legal values are "millisecond"
, "second"
, "minute"
,
"hour"
, "day"
, "week"
, "month"
, and "year"
. Alternatively, time
and utc
scales can accept an object-valued interval specifier of the form {"interval": "month", "step": 3}
, which includes a desired number of interval steps. Here, the domain would
snap to quarter (Jan, Apr, Jul, Oct) boundaries.
Default value: true
for unbinned quantitative fields; false
otherwise.
Variants
Bool(bool)
Double(f64)
Enum(NiceTime)
NiceClass(NiceClass)
Trait Implementations
impl Clone for NiceUnion
[src]
impl Debug for NiceUnion
[src]
impl<'de> Deserialize<'de> for NiceUnion
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl From<NiceClass> for NiceUnion
[src]
impl From<NiceTime> for NiceUnion
[src]
impl From<bool> for NiceUnion
[src]
impl From<f64> for NiceUnion
[src]
impl Serialize for NiceUnion
[src]
Auto Trait Implementations
impl RefUnwindSafe for NiceUnion
impl Send for NiceUnion
impl Sync for NiceUnion
impl Unpin for NiceUnion
impl UnwindSafe for NiceUnion
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>,