- java.lang.Object
-
- com.iamsoft.util.ui.javafx.chart.AxisUtil
-
public final class AxisUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidconfigureAutoDateTickUnit(javafx.scene.chart.NumberAxis pAxis)static voidconfigureDateAxis(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.static voidconfigureDateAxis(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.static voidconfigureDateTickLabelFormatter(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.static RunnableconfigureDateTickLabelFormatter(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.static javafx.scene.chart.NumberAxiscreateDateAxis()static javafx.scene.chart.NumberAxiscreateDateAxis(Long pLowerBound, Long pUpperBound)Creates aNumberAxisfor representing dates with default tick unit of one week and label format pattern"MMM d, yyyy"(e.g.static javafx.util.StringConverter<Number>createDateTickLabelFormatter()static javafx.util.StringConverter<Number>createDateTickLabelFormatter(String pPattern)static javafx.util.StringConverter<Number>createLocalDateTimeTickLabelFormatter(String pPattern)static javafx.util.StringConverter<Number>createPercentageTickLabelFormatter()static Optional<Number>getMaxX(List<javafx.scene.chart.XYChart.Series<Number,Number>> pSeriesData)static Optional<Number>getMaxX(javafx.scene.chart.XYChart.Series<Number,Number> pSeries)static javafx.beans.property.ReadOnlyObjectProperty<Number>getMaxXProperty(javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<Number,Number>>> pSeriesListProperty, long pDelayMillis)static javafx.beans.property.ReadOnlyObjectProperty<Number>getMaxXProperty(javafx.scene.chart.XYChart.Series<Number,Number> pSeries)static Optional<Number>getMaxY(List<javafx.scene.chart.XYChart.Series<Number,Number>> pSeriesData)static Optional<Number>getMaxY(javafx.scene.chart.XYChart.Series<Number,Number> pSeries)static javafx.beans.property.ReadOnlyObjectProperty<Number>getMaxYProperty(javafx.scene.chart.XYChart.Series<Number,Number> pSeries)static Optional<Number>getMinX(List<javafx.scene.chart.XYChart.Series<Number,Number>> pSeriesData)static Optional<Number>getMinX(javafx.scene.chart.XYChart.Series<Number,Number> pSeries)static javafx.beans.property.ReadOnlyObjectProperty<Number>getMinXProperty(javafx.beans.property.ObjectProperty<javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<Number,Number>>> pSeriesListProperty, long pDelayMillis)static javafx.beans.property.ReadOnlyObjectProperty<Number>getMinXProperty(javafx.scene.chart.XYChart.Series<Number,Number> pSeries)static Optional<Number>getMinY(List<javafx.scene.chart.XYChart.Series<Number,Number>> pSeriesData)static Optional<Number>getMinY(javafx.scene.chart.XYChart.Series<Number,Number> pSeries)static javafx.beans.property.ReadOnlyObjectProperty<Number>getMinYProperty(javafx.scene.chart.XYChart.Series<Number,Number> pSeries)static longgetTickUnitValue(TimeUnit pTimeUnit, long pDuration)static DatetoDate(Number pValue)static LocalDateTimetoLocalDateTime(Number pValue)static longtoLong(Date pDate)
-
-
-
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)
-
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 aNumberAxisfor 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)
-
-