# CategoryAxis

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls-charts/struct-categoryaxis/

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

```rust
struct CategoryAxis
```

An axis whose categories retain source order or sort by their values.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Charts/category_axis.rs#L10)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`sort_key_property`](#function-sort_key_property)
- [`sort_order_property`](#function-sort_order_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`sort_key`](#function-sort_key)
- [`set_sort_key`](#function-set_sort_key)
- [`sort_order`](#function-sort_order)
- [`set_sort_order`](#function-set_sort_order)
- [`sorted_indices_by`](#function-sorted_indices_by)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Charts/category_axis.rs#L14)

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<CategoryAxis>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Charts/category_axis.rs#L14)

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

### sort_key_property

```rust
fn sort_key_property() -> &'static StyledProperty<CategorySortKey>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Charts/category_axis.rs#L20)

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

### sort_order_property

```rust
fn sort_order_property() -> &'static StyledProperty<SortOrder>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Charts/category_axis.rs#L20)

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

### construct

```rust
fn construct() -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Charts/category_axis.rs#L30)

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

### new

```rust
fn new() -> Ref<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Charts/category_axis.rs#L35)

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

### sort_key

```rust
fn sort_key(self: &Self) -> CategorySortKey
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Charts/category_axis.rs#L38)

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

### set_sort_key

```rust
fn set_sort_key(self: &Self, value: CategorySortKey)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Charts/category_axis.rs#L41)

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

### sort_order

```rust
fn sort_order(self: &Self) -> SortOrder
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Charts/category_axis.rs#L44)

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

### set_sort_order

```rust
fn set_sort_order(self: &Self, value: SortOrder)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Charts/category_axis.rs#L47)

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

### sorted_indices_by

```rust
fn sorted_indices_by(self: &Self, count: usize, compare: impl FnMut(usize, usize) -> Ordering) -> Vec<usize>
```

Source indices in display order. Equal values retain source order.
The comparator allows typed numeric/date values to remain typed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Charts/category_axis.rs#L53)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<CategoryAxis>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)

## Availability

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