Struct Axis

Source
pub struct Axis { /* private fields */ }

Implementations§

Source§

impl Axis

Source

pub fn visible(self, value: bool) -> Self

Source

pub fn category_array(self, value: Vec<impl Into<NumOrString> + Clone>) -> Self

Sets the order in which categories on this axis appear. Only has an effect if category_order is set to CategoryOrder::Array. Used with category_order.

Source

pub fn category_order(self, value: CategoryOrder) -> Self

Specifies the ordering logic for the case of categorical variables. By default, plotly uses CategoryOrder::Trace, which specifies the order that is present in the data supplied. Set category_order to CategoryOrder::CategoryAscending or CategoryOrder::CategoryDescending if order should be determined by the alphanumerical order of the category names. Set category_order to CategoryOrder::Array to derive the ordering from the attribute category_array. If a category is not found in the category_array array, the sorting behavior for that attribute will be identical to the CategoryOrder::Trace mode. The unspecified categories will follow the categories in category_array. Set category_order to CategoryOrder::TotalAscending or CategoryOrder::TotalDescending if order should be determined by the numerical order of the values. Similarly, the order can be determined by the min, max, sum, mean, geometric mean or median of all the values.

Source

pub fn color(self, value: impl Color) -> Self

Source

pub fn title(self, value: impl Into<Title>) -> Self

Source

pub fn auto_range(self, value: bool) -> Self

Source

pub fn range_mode(self, value: RangeMode) -> Self

Source

pub fn range(self, value: Vec<impl Into<NumOrString> + Clone>) -> Self

Source

pub fn fixed_range(self, value: bool) -> Self

Source

pub fn constrain(self, value: AxisConstrain) -> Self

Source

pub fn constrain_toward(self, value: ConstrainDirection) -> Self

Source

pub fn tick_mode(self, value: TickMode) -> Self

Source

pub fn n_ticks(self, value: usize) -> Self

Source

pub fn scale_anchor(self, value: impl AsRef<str>) -> Self

Source

pub fn tick0(self, value: f64) -> Self

Source

pub fn dtick(self, value: f64) -> Self

Source

pub fn tick_values(self, value: Vec<f64>) -> Self

Source

pub fn tick_text(self, value: Vec<impl AsRef<str>>) -> Self

Source

pub fn ticks(self, value: TicksDirection) -> Self

Source

pub fn ticks_on(self, value: TicksPosition) -> Self

Source

pub fn mirror(self, value: bool) -> Self

Source

pub fn tick_length(self, value: usize) -> Self

Source

pub fn tick_width(self, value: usize) -> Self

Source

pub fn tick_color(self, value: impl Color) -> Self

Source

pub fn show_tick_labels(self, value: bool) -> Self

Source

pub fn auto_margin(self, value: bool) -> Self

Source

pub fn show_spikes(self, value: bool) -> Self

Source

pub fn spike_color(self, value: impl Color) -> Self

Source

pub fn spike_thickness(self, value: usize) -> Self

Source

pub fn spike_dash(self, value: DashType) -> Self

Source

pub fn spike_mode(self, value: SpikeMode) -> Self

Source

pub fn spike_snap(self, value: SpikeSnap) -> Self

Source

pub fn tick_font(self, value: Font) -> Self

Source

pub fn tick_angle(self, value: f64) -> Self

Source

pub fn tick_prefix(self, value: impl AsRef<str>) -> Self

Source

pub fn show_tick_prefix(self, value: ArrayShow) -> Self

Source

pub fn tick_suffix(self, value: impl AsRef<str>) -> Self

Source

pub fn show_tick_suffix(self, value: ArrayShow) -> Self

Source

pub fn show_exponent(self, value: ArrayShow) -> Self

Source

pub fn exponent_format(self, value: ExponentFormat) -> Self

Source

pub fn separate_thousands(self, value: bool) -> Self

Source

pub fn tick_format(self, value: impl AsRef<str>) -> Self

Source

pub fn tick_format_stops(self, value: Vec<TickFormatStop>) -> Self

Source

pub fn hover_format(self, value: impl AsRef<str>) -> Self

Source

pub fn show_line(self, value: bool) -> Self

Source

pub fn line_color(self, value: impl Color) -> Self

Source

pub fn line_width(self, value: usize) -> Self

Source

pub fn show_grid(self, value: bool) -> Self

Source

pub fn grid_color(self, value: impl Color) -> Self

Source

pub fn grid_width(self, value: usize) -> Self

Source

pub fn zero_line(self, value: bool) -> Self

Source

pub fn zero_line_color(self, value: impl Color) -> Self

Source

pub fn zero_line_width(self, value: usize) -> Self

Source

pub fn show_dividers(self, value: bool) -> Self

Source

pub fn divider_color(self, value: impl Color) -> Self

Source

pub fn divider_width(self, value: usize) -> Self

Source

pub fn anchor(self, value: impl AsRef<str>) -> Self

Source

pub fn side(self, value: AxisSide) -> Self

Source

pub fn overlaying(self, value: impl AsRef<str>) -> Self

Source

pub fn position(self, value: f64) -> Self

Source

pub fn range_slider(self, value: RangeSlider) -> Self

Source

pub fn range_selector(self, value: RangeSelector) -> Self

Source

pub fn calendar(self, value: Calendar) -> Self

Source§

impl Axis

Source

pub fn new() -> Self

Source

pub fn matches(self, matches: &str) -> Self

Source

pub fn type_(self, t: AxisType) -> Self

Source

pub fn domain(self, domain: &[f64]) -> Self

Trait Implementations§

Source§

impl Clone for Axis

Source§

fn clone(&self) -> Axis

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Axis

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Axis

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Serialize for Axis

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Axis

§

impl !RefUnwindSafe for Axis

§

impl Send for Axis

§

impl Sync for Axis

§

impl Unpin for Axis

§

impl !UnwindSafe for Axis

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V