Class AxisUtil


  • public final class AxisUtil
    extends Object
    • Method Detail

      • createDateTickLabelFormatter

        public static javafx.util.StringConverter<Number> createDateTickLabelFormatter()
      • createDateTickLabelFormatter

        public static javafx.util.StringConverter<Number> createDateTickLabelFormatter​(String pPattern)
      • configureDateTickLabelFormatter

        public static void configureDateTickLabelFormatter​(javafx.scene.chart.NumberAxis pAxis,
                                                           javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<Number,​Number>>> pDataProperty)
        Configure automatically trimming tick label format based on two factors - range of full chart and range of zoomed subsection.
      • configureDateTickLabelFormatter

        public static Runnable configureDateTickLabelFormatter​(javafx.scene.chart.NumberAxis pAxis,
                                                               javafx.beans.value.ObservableValue<Number> pMinX,
                                                               javafx.beans.value.ObservableValue<Number> pMaxX)
        Configure automatically trimming tick label formatting based on two factors - range of full chart and range of zoomed subsection. Note that this method may impact performance if min/max properties are mutated too frequently.
        Returns:
        An unsubscriber, which can be used to stop the automatically trimming tick label formatting.
      • toLong

        public static long toLong​(Date pDate)
      • toDate

        public static Date toDate​(Number pValue)
      • createLocalDateTimeTickLabelFormatter

        public static javafx.util.StringConverter<Number> createLocalDateTimeTickLabelFormatter​(String pPattern)
      • createPercentageTickLabelFormatter

        public static javafx.util.StringConverter<Number> createPercentageTickLabelFormatter()
      • getTickUnitValue

        public static long getTickUnitValue​(TimeUnit pTimeUnit,
                                            long pDuration)
      • configureAutoDateTickUnit

        public static void configureAutoDateTickUnit​(javafx.scene.chart.NumberAxis pAxis)
      • createDateAxis

        public static javafx.scene.chart.NumberAxis createDateAxis()
      • createDateAxis

        public static javafx.scene.chart.NumberAxis createDateAxis​(Long pLowerBound,
                                                                   Long pUpperBound)
        Creates a NumberAxis for representing dates with default tick unit of one week and label format pattern "MMM d, yyyy" (e.g. Feb 1, 2019).
      • configureDateAxis

        public static void configureDateAxis​(javafx.scene.chart.NumberAxis pAxis)
        Configures the specified axis for representing dates with default tick unit of one week and label format pattern "MMM d, yyyy" (e.g. Feb 1, 2019).
      • configureDateAxis

        public static void configureDateAxis​(javafx.scene.chart.NumberAxis pAxis,
                                             Long pLowerBound,
                                             Long pUpperBound)
        Configures the specified axis for representing dates with default tick unit of one week and label format pattern "MMM d, yyyy" (e.g. Feb 1, 2019).
      • getMinXProperty

        public static javafx.beans.property.ReadOnlyObjectProperty<Number> getMinXProperty​(javafx.scene.chart.XYChart.Series<Number,​Number> pSeries)
      • getMinXProperty

        public static javafx.beans.property.ReadOnlyObjectProperty<Number> getMinXProperty​(javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<Number,​Number>>> pSeriesListProperty,
                                                                                           long pDelayMillis)
        Parameters:
        pDelayMillis - If greater than zero, property will not be updated more frequently than the specified delay.
      • getMaxXProperty

        public static javafx.beans.property.ReadOnlyObjectProperty<Number> getMaxXProperty​(javafx.scene.chart.XYChart.Series<Number,​Number> pSeries)
      • getMaxXProperty

        public static javafx.beans.property.ReadOnlyObjectProperty<Number> getMaxXProperty​(javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<Number,​Number>>> pSeriesListProperty,
                                                                                           long pDelayMillis)
        Parameters:
        pDelayMillis - If greater than zero, property will not be updated more frequently than the specified delay.
      • getMinYProperty

        public static javafx.beans.property.ReadOnlyObjectProperty<Number> getMinYProperty​(javafx.scene.chart.XYChart.Series<Number,​Number> pSeries)
      • getMaxYProperty

        public static javafx.beans.property.ReadOnlyObjectProperty<Number> getMaxYProperty​(javafx.scene.chart.XYChart.Series<Number,​Number> pSeries)