Class AxisUtil

java.lang.Object
com.iamsoft.util.ui.javafx.chart.AxisUtil

public final class AxisUtil extends Object
  • Method Details

    • 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)
    • toLocalDateTime

      public static LocalDateTime toLocalDateTime(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)
    • getMinX

      public static Optional<Number> getMinX(List<javafx.scene.chart.XYChart.Series<Number,Number>> pSeriesData)
    • getMinX

      public static Optional<Number> getMinX(javafx.scene.chart.XYChart.Series<Number,Number> pSeries)
    • getMaxX

      public static Optional<Number> getMaxX(List<javafx.scene.chart.XYChart.Series<Number,Number>> pSeriesData)
    • getMaxX

      public static Optional<Number> getMaxX(javafx.scene.chart.XYChart.Series<Number,Number> pSeries)
    • getMinY

      public static Optional<Number> getMinY(List<javafx.scene.chart.XYChart.Series<Number,Number>> pSeriesData)
    • getMinY

      public static Optional<Number> getMinY(javafx.scene.chart.XYChart.Series<Number,Number> pSeries)
    • getMaxY

      public static Optional<Number> getMaxY(List<javafx.scene.chart.XYChart.Series<Number,Number>> pSeriesData)
    • getMaxY

      public static Optional<Number> getMaxY(javafx.scene.chart.XYChart.Series<Number,Number> pSeries)