FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    DateTimeAxis

    struct · ferroui-controls-charts · v0.5.0

    struct DateTimeAxis
    

    A date axis whose bounds compare UTC instants and whose ticks follow calendar boundaries. Dates before the Unix epoch remain valid.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<DateTimeAxis>
    

    Returns a strong reference to this object.

    Source

    minimum_property

    fn minimum_property() -> &'static StyledProperty<Option<DateTimeOffset>>
    

    Source

    maximum_property

    fn maximum_property() -> &'static StyledProperty<Option<DateTimeOffset>>
    

    Source

    interval_type_property

    fn interval_type_property() -> &'static StyledProperty<DateTimeIntervalType>
    

    Source

    label_format_property

    fn label_format_property() -> &'static StyledProperty<String>
    

    Source

    construct

    fn construct() -> Self
    

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    minimum

    fn minimum(self: &Self) -> Option<DateTimeOffset>
    

    Source

    set_minimum

    fn set_minimum(self: &Self, value: Option<DateTimeOffset>) -> Result<(), ChartError>
    

    Source

    maximum

    fn maximum(self: &Self) -> Option<DateTimeOffset>
    

    Source

    set_maximum

    fn set_maximum(self: &Self, value: Option<DateTimeOffset>) -> Result<(), ChartError>
    

    Source

    interval_type

    fn interval_type(self: &Self) -> DateTimeIntervalType
    

    Source

    set_interval_type

    fn set_interval_type(self: &Self, value: DateTimeIntervalType)
    

    Source

    label_format

    fn label_format(self: &Self) -> String
    

    Source

    set_label_format

    fn set_label_format(self: &Self, value: impl Into<String>)
    

    Source

    set_optional_label_format

    fn set_optional_label_format(self: &Self, value: Option<&str>)
    

    Source

    resolve_range

    fn resolve_range(self: &Self, values: &[DateTimeOffset]) -> (DateTimeOffset, DateTimeOffset)
    

    Automatic bounds use the sample instants; an empty source has a deterministic one-day range beginning at the Unix epoch.

    Source

    resolved_interval

    fn resolved_interval(self: &Self, minimum: DateTimeOffset, maximum: DateTimeOffset, target_tick_count: usize) -> DateTimeIntervalType
    

    The interval of the ticks between minimum and maximum: the IntervalType, or for Auto the calendar unit that gives about target_tick_count ticks.

    Source

    ticks

    fn ticks(self: &Self, minimum: DateTimeOffset, maximum: DateTimeOffset, target_tick_count: usize) -> Vec<DateTimeOffset>
    

    Calendar-aligned ticks in UTC. Month/year ticks use calendar arithmetic, so leap days and variable-length months are preserved. Explicit daily/weekly intervals may be sampled for very large ranges; no call produces more than 4096 ticks. A daily range with fewer than two midnights in it is divided into whole minutes or hours instead.

    Source

    format_tick

    fn format_tick(self: &Self, value: DateTimeOffset) -> String
    

    Formats an axis label using the framework's culture-aware date formatter. The public WinRT templates used by the source samples are translated to their framework format equivalents.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.