# Axis

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-livecharts/axis/struct-axis/

**struct** · [`ferroui-livecharts`](/docs/0.5.0/api/ferroui-livecharts/) · v0.5.0

```rust
struct Axis
```



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L20)

## Members

- [`name`](#struct_field-name)
- [`labels`](#struct_field-labels)
- [`min_limit`](#struct_field-min_limit)
- [`max_limit`](#struct_field-max_limit)
- [`min_step`](#struct_field-min_step)
- [`min_separators`](#struct_field-min_separators)
- [`force_step`](#struct_field-force_step)
- [`unit_width`](#struct_field-unit_width)
- [`inverted`](#struct_field-inverted)
- [`visible`](#struct_field-visible)
- [`show_separator_lines`](#struct_field-show_separator_lines)
- [`position`](#struct_field-position)
- [`text_size`](#struct_field-text_size)
- [`labels_rotation`](#struct_field-labels_rotation)
- [`labels_density`](#struct_field-labels_density)
- [`labels_angle`](#struct_field-labels_angle)
- [`custom_separators`](#struct_field-custom_separators)
- [`labels_padding`](#struct_field-labels_padding)
- [`labels_color`](#struct_field-labels_color)
- [`separators_color`](#struct_field-separators_color)
- [`logarithmic_base`](#struct_field-logarithmic_base)
- [`padding`](#struct_field-padding)
- [`labeler`](#struct_field-labeler)
- [`labels_background`](#struct_field-labels_background)
- [`date_time`](#function-date_time)
- [`time_span`](#function-time_span)
- [`labels_padding_or`](#function-labels_padding_or)
- [`tick`](#function-tick)
- [`label`](#function-label)

<a id="struct_field-name"></a>

### name

```rust
name: String
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L21)

<a id="struct_field-labels"></a>

### labels

```rust
labels: Vec<String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L22)

<a id="struct_field-min_limit"></a>

### min_limit

```rust
min_limit: Option<f64>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L23)

<a id="struct_field-max_limit"></a>

### max_limit

```rust
max_limit: Option<f64>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L24)

<a id="struct_field-min_step"></a>

### min_step

```rust
min_step: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L25)

<a id="struct_field-min_separators"></a>

### min_separators

```rust
min_separators: u32
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L26)

<a id="struct_field-force_step"></a>

### force_step

```rust
force_step: bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L27)

<a id="struct_field-unit_width"></a>

### unit_width

```rust
unit_width: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L28)

<a id="struct_field-inverted"></a>

### inverted

```rust
inverted: bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L29)

<a id="struct_field-visible"></a>

### visible

```rust
visible: bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L30)

<a id="struct_field-show_separator_lines"></a>

### show_separator_lines

```rust
show_separator_lines: bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L31)

<a id="struct_field-position"></a>

### position

```rust
position: AxisPosition
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L32)

<a id="struct_field-text_size"></a>

### text_size

```rust
text_size: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L33)

<a id="struct_field-labels_rotation"></a>

### labels_rotation

```rust
labels_rotation: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L34)

<a id="struct_field-labels_density"></a>

### labels_density

```rust
labels_density: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L35)

<a id="struct_field-labels_angle"></a>

### labels_angle

```rust
labels_angle: f64
```

Absolute angular position, in degrees, of radial-axis labels.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L37)

<a id="struct_field-custom_separators"></a>

### custom_separators

```rust
custom_separators: Vec<f64>
```

Explicit axis separators; an empty list uses automatically calculated ticks.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L39)

<a id="struct_field-labels_padding"></a>

### labels_padding

```rust
labels_padding: Option<f64>
```

Padding around each label, in FerroUI logical pixels. `None` takes the default of the
chart family: `CARTESIAN_LABELS_PADDING` (the source theme's `Padding` of Cartesian
axes) or `POLAR_LABELS_PADDING` (the `LabelsPadding` of a source polar axis).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L43)

<a id="struct_field-labels_color"></a>

### labels_color

```rust
labels_color: ferroui_base::media::Color
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L44)

<a id="struct_field-separators_color"></a>

### separators_color

```rust
separators_color: ferroui_base::media::Color
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L45)

<a id="struct_field-logarithmic_base"></a>

### logarithmic_base

```rust
logarithmic_base: Option<f64>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L46)

<a id="struct_field-padding"></a>

### padding

```rust
padding: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L47)

<a id="struct_field-labeler"></a>

### labeler

```rust
labeler: Option<crate::labelers::Labeler>
```

The label of a value (`Labeler`); `None` takes the native number format. The `labels`
win over it, as in the source's `GetActualLabeler`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L50)

<a id="struct_field-labels_background"></a>

### labels_background

```rust
labels_background: Option<ferroui_base::media::Color>
```

The background of the labels of a polar axis (`LabelsBackground`); `None` takes the
source's white (`POLAR_LABELS_BACKGROUND`) and a transparent colour draws none.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L53)

<a id="function-date_time"></a>

### date_time

```rust
fn date_time(unit: SignedDuration, formatter: impl Fn(DateTime) -> String + 'static) -> Self
```

A `DateTimeAxis`: its unit width and minimum step are the ticks of `unit`, and it labels
the date of a value (`AsDate`) with `formatter`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L96)

<a id="function-time_span"></a>

### time_span

```rust
fn time_span(unit: SignedDuration, formatter: impl Fn(SignedDuration) -> String + 'static) -> Self
```

A `TimeSpanAxis`: its unit width and minimum step are the ticks of `unit`, and it labels
the interval of a value (`AsTimeSpan`) with `formatter`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L109)

<a id="function-labels_padding_or"></a>

### labels_padding_or

```rust
fn labels_padding_or(self: &Self, default: f64) -> f64
```

The label padding, or the given family default when none is set.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L121)

<a id="function-tick"></a>

### tick

```rust
fn tick(self: &Self, size: Size, orientation: AxisOrientation, labels: Size, min: f64, max: f64) -> AxisTick
```

`Extensions.GetTick` of a Cartesian axis: the nice step for the given bounds (the axis
limits win over them) in a control of the given size, with the label size measured by
the host. Zero-width bounds take 15% of the maximum as their range, as the source does.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L127)

<a id="function-label"></a>

### label

```rust
fn label(self: &Self, value: f64) -> String
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/axis.rs#L151)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Default`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
