Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: DateAxis

[21:7] extends: Axis

DateAxis wraps extfx.scene.chart.DateAxis (Christian Schudt's MIT-licensed date axis, vendored under src/extfx), a time axis for JavaFX XY charts that plots real dates instead of category label strings. It automatically chooses the tick granularity, from decades down to milliseconds, and a matching label format based on the visible range and the axis width, so a time series does not need pre-formatted string categories. Bounds are Aussom Date objects, the same type DatePicker uses: setters accept an Aussom Date and getters return an Aussom Date. Extends Axis, so all the shared axis methods (setLabel, setAnimated, setAutoRanging, tick styling, and so on) are inherited.

Methods

  • DateAxis (Lower = null, Upper = null)

    Creates a DateAxis. With no bounds the axis auto-ranges to its data. When both bounds are given, the axis is fixed to that date range.

    • @p Lower is an optional lower-bound Aussom Date.
    • @p Upper is an optional upper-bound Aussom Date.
  • toJavaDate (DateObj)

  • fromJavaDate (D)

  • setLowerBound (DateObj)

    Sets the axis lower bound, the earliest date shown.

    • @p DateObj is an Aussom Date, or null to auto-range.
    • @r this object for chaining
  • getLowerBound ()

    Returns the axis lower bound as an Aussom Date, or null when unset.

    • @r An Aussom Date, or null.
  • lowerBoundProperty ()

    Returns the lowerBound ObjectProperty for binding.

    • @r An AJO around the bound date ObjectProperty (for binding only).
  • setUpperBound (DateObj)

    Sets the axis upper bound, the latest date shown.

    • @p DateObj is an Aussom Date, or null to auto-range.
    • @r this object for chaining
  • getUpperBound ()

    Returns the axis upper bound as an Aussom Date, or null when unset.

    • @r An Aussom Date, or null.
  • upperBoundProperty ()

    Returns the upperBound ObjectProperty for binding.

    • @r An AJO around the bound date ObjectProperty (for binding only).
  • setDateFormat (string Pattern)

    Sets the tick label format from a date-format pattern, for example "yyyy-MM-dd" or "HH:mm". This replaces the automatic per-granularity formatting with a single fixed pattern.

    • @p Pattern is a java.text.SimpleDateFormat pattern string.
    • @r this object for chaining
  • setTickLabelFormatter (Converter)

    Sets the tick label formatter directly.

    • @p Converter is a javafx.util.StringConverter for Date (or FxObj).
    • @r this object for chaining
  • getTickLabelFormatter ()

    Returns the tick label formatter.

    • @r An AJO around the StringConverter, or null.
  • tickLabelFormatterProperty ()

    Returns the tickLabelFormatter ObjectProperty for binding.

    • @r An AJO around the ObjectProperty.