java.lang.Object
com.iamsoft.util.ui.javafx.chart.ChartUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic <X,
Y> javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> createClosestDataPointHandler
(List<javafx.scene.chart.LineChart<X, Y>> pCharts, boolean pNullValueOnMouseExit, Consumer<javafx.scene.chart.XYChart.Data<X, Y>> pClosestDataPointConsumer) static <X,
Y> javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> createClosestDataPointHandler
(List<javafx.scene.chart.LineChart<X, Y>> pCharts, boolean pNullValueOnMouseExit, Consumer<javafx.scene.chart.XYChart.Data<X, Y>> pClosestDataPointConsumer, ClosestDataPointFunction<X, Y> pClosestDataPointFunction) static <X,
Y> javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> createClosestDataPointHandler
(javafx.scene.chart.LineChart<X, Y> pChart, boolean pNullValueOnMouseExit, Consumer<javafx.scene.chart.XYChart.Data<X, Y>> pClosestDataPointConsumer) static <X,
Y> javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> createClosestDataPointHandler
(javafx.scene.chart.LineChart<X, Y> pChart, boolean pNullValueOnMouseExit, Consumer<javafx.scene.chart.XYChart.Data<X, Y>> pClosestDataPointConsumer, ClosestDataPointFunction<X, Y> pClosestDataPointFunction) static <X,
Y> javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X, Y>> createClosestToMouseDataPointProperty
(javafx.collections.ObservableList<javafx.scene.chart.LineChart<X, Y>> pCharts, boolean pNullValueOnMouseExit) static <X,
Y> javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X, Y>> createClosestToMouseDataPointProperty
(javafx.collections.ObservableList<javafx.scene.chart.LineChart<X, Y>> pCharts, boolean pNullValueOnMouseExit, ClosestDataPointFunction<X, Y> pClosestDataPointFunction) static <X,
Y> javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X, Y>> createClosestToMouseDataPointProperty
(javafx.scene.chart.LineChart<X, Y> pChart, boolean pNullValueOnMouseExit) static <X,
Y> javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X, Y>> createClosestToMouseDataPointProperty
(javafx.scene.chart.LineChart<X, Y> pChart, boolean pNullValueOnMouseExit, ClosestDataPointFunction<X, Y> pClosestDataPointFunction) static <X,
Y> javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X, Y>> displayClosestToMouseMarker
(javafx.collections.ObservableList<javafx.scene.chart.LineChart<X, Y>> pCharts, boolean pHideOnMouseExit) static <X,
Y> javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X, Y>> displayClosestToMouseMarker
(javafx.collections.ObservableList<javafx.scene.chart.LineChart<X, Y>> pCharts, boolean pHideOnMouseExit, ClosestDataPointFunction<X, Y> pClosestDataPointFunction) static <X,
Y> javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X, Y>> displayClosestToMouseMarker
(javafx.scene.chart.LineChart<X, Y> pChart, boolean pHideOnMouseExit) static <X,
Y> javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X, Y>> displayClosestToMouseMarker
(javafx.scene.chart.LineChart<X, Y> pChart, boolean pHideOnMouseExit, ClosestDataPointFunction<X, Y> pClosestDataPointFunction) static <X,
Y> void displayMarker
(javafx.scene.chart.LineChart<X, Y> pChart, javafx.beans.value.ObservableValue<javafx.scene.chart.XYChart.Data<X, Y>> pMarkerProperty) static <X,
Y> void displayPopup
(javafx.beans.value.ObservableValue<javafx.scene.chart.XYChart.Data<X, Y>> pData, Function<javafx.scene.chart.XYChart.Data<X, Y>, String> pToStringConverter) Shows a popup label for the specified data point using the specified string converter.static <X,
Y> void displayPopup
(javafx.beans.value.ObservableValue<javafx.scene.chart.XYChart.Data<X, Y>> pData, Function<javafx.scene.chart.XYChart.Data<X, Y>, String> pToStringConverter, Function<javafx.scene.Node, javafx.collections.ObservableList<javafx.scene.Node>> pChildrenProvider) Shows a popup label for the specified data point using the specified string converter.static <X,
Y> Optional<javafx.scene.chart.XYChart<X, Y>> getChart
(javafx.scene.chart.XYChart.Data<X, Y> pData) static <X,
Y> javafx.scene.chart.XYChart.Data<X, Y> getClosestDataPoint
(List<javafx.scene.chart.LineChart<X, Y>> pCharts, double pXPos, double pYPos) static <X,
Y> javafx.scene.chart.XYChart.Data<X, Y> getClosestDataPoint
(List<javafx.scene.chart.LineChart<X, Y>> pCharts, double pXPos, double pYPos, ClosestDataPointFunction<X, Y> pClosestDataPointFunction) static <X,
Y> javafx.scene.chart.XYChart.Data<X, Y> getClosestDataPoint
(javafx.scene.chart.LineChart<X, Y> pChart, double pXPos, double pYPos) static String
getDifferentStrokesForSeriesLinesCss
(int pMaxSeriesCount) static <X,
Y> Optional<javafx.geometry.Point2D> getDisplayPosition
(javafx.scene.chart.XYChart.Data<X, Y> pData) static <X,
Y> javafx.geometry.Point2D getDisplayPosition
(javafx.scene.chart.XYChart<X, Y> pChart, javafx.scene.chart.XYChart.Data<X, Y> pDataPoint) Gets the display position of the specified data point, ornull
, if null arguments are specified or the specified data point is not valid.static <T> String
getLabel
(javafx.scene.chart.Axis<T> pAxis, T pValue) static String
getStrokeColorCss
(javafx.scene.Node pNode) static String
getStrokeCss
(javafx.scene.Node pNode) static <T> Optional<javafx.util.StringConverter<T>>
getTickLabelFormatter
(javafx.scene.chart.Axis<T> pAxis) static <X> String
getXLabel
(javafx.scene.chart.XYChart.Data<X, ?> pData) If the specified data is added to a chart with X-axis of typeValueAxis
with non-null tick label formatter, this formatter is used to get a string representation of the specified data's X value.static <Y> String
getYLabel
(javafx.scene.chart.XYChart.Data<?, Y> pData) If the specified data is added to a chart with Y-axis of typeValueAxis
with non-null tick label formatter, this formatter is used to get a string representation of the specified data's Y value.static <X,
Y> void hideMarkers
(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X, Y>> pSeriesList) static void
installMouseHandler
(javafx.scene.chart.LineChart<?, ?> pChart, javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> pMouseHandler) static <X,
Y> void setSeriesLineColor
(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X, Y>> pSeriesData, String pColor) static <X,
Y> void setSeriesLineStroke
(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X, Y>> pSeriesData, ChartSeriesLineStroke pStroke) static <X,
Y> void setSeriesLineStyle
(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X, Y>> pSeriesData, IntFunction<String> pStyleProvider, Pattern pStylePattern) static <X,
Y> void setSeriesLineWidth
(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X, Y>> pSeriesData, double pStrokeWidth) static void
static void
uninstallMouseHandler
(javafx.scene.chart.LineChart<?, ?> pChart, javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> pMouseHandler) static <X,
Y> void updateGuideLineSizeAndLocation
(javafx.scene.chart.LineChart<X, Y> pChart, GuideLine<?> pGuideLine, javafx.geometry.Insets pInsets) static <X,
Y> void updateGuideLineValue
(GuideLine<?> pGuideLine, javafx.scene.input.MouseEvent pEvt, GuideLineValueConverter<X> pXValueConverter, GuideLineValueConverter<Y> pYValueConverter) static <T> void
updateGuideLineValue
(GuideLine<T> pGuideLine, double pLocation, GuideLineValueConverter<T> pValueConverter) static <T> void
updateGuideLineValue
(GuideLine<T> pGuideLine, javafx.scene.input.MouseEvent pEvt, GuideLineValueConverter<T> pValueConverter) static <X,
Y> void updateGuideLineValue
(javafx.scene.chart.LineChart<X, Y> pChart, GuideLine<?> pGuideLine, javafx.scene.input.MouseEvent pEvt) static <X,
Y> void useDifferentColorsForSeriesLines
(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X, Y>> pSeriesData, String pColor) static <X,
Y> void useDifferentStrokesForSeriesLines
(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X, Y>> pSeriesData)
-
Method Details
-
getDisplayPosition
public static <X,Y> javafx.geometry.Point2D getDisplayPosition(javafx.scene.chart.XYChart<X, Y> pChart, javafx.scene.chart.XYChart.Data<X, Y> pDataPoint) Gets the display position of the specified data point, ornull
, if null arguments are specified or the specified data point is not valid. -
getDisplayPosition
public static <X,Y> Optional<javafx.geometry.Point2D> getDisplayPosition(javafx.scene.chart.XYChart.Data<X, Y> pData) -
getChart
public static <X,Y> Optional<javafx.scene.chart.XYChart<X,Y>> getChart(javafx.scene.chart.XYChart.Data<X, Y> pData) -
getXLabel
If the specified data is added to a chart with X-axis of typeValueAxis
with non-null tick label formatter, this formatter is used to get a string representation of the specified data's X value. Otherwise,pData.getXValue().toString()
is returned. -
getYLabel
If the specified data is added to a chart with Y-axis of typeValueAxis
with non-null tick label formatter, this formatter is used to get a string representation of the specified data's Y value. Otherwise,pData.getYValue().toString()
is returned. -
getLabel
-
getTickLabelFormatter
public static <T> Optional<javafx.util.StringConverter<T>> getTickLabelFormatter(javafx.scene.chart.Axis<T> pAxis) -
hideMarkers
public static <X,Y> void hideMarkers(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X, Y>> pSeriesList) -
installMouseHandler
public static void installMouseHandler(javafx.scene.chart.LineChart<?, ?> pChart, javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> pMouseHandler) -
uninstallMouseHandler
public static void uninstallMouseHandler(javafx.scene.chart.LineChart<?, ?> pChart, javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> pMouseHandler) -
createClosestToMouseDataPointProperty
public static <X,Y> javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X,Y>> createClosestToMouseDataPointProperty(javafx.scene.chart.LineChart<X, Y> pChart, boolean pNullValueOnMouseExit) -
createClosestToMouseDataPointProperty
public static <X,Y> javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X,Y>> createClosestToMouseDataPointProperty(javafx.scene.chart.LineChart<X, Y> pChart, boolean pNullValueOnMouseExit, ClosestDataPointFunction<X, Y> pClosestDataPointFunction) -
createClosestToMouseDataPointProperty
public static <X,Y> javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X,Y>> createClosestToMouseDataPointProperty(javafx.collections.ObservableList<javafx.scene.chart.LineChart<X, Y>> pCharts, boolean pNullValueOnMouseExit) -
createClosestToMouseDataPointProperty
public static <X,Y> javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X,Y>> createClosestToMouseDataPointProperty(javafx.collections.ObservableList<javafx.scene.chart.LineChart<X, Y>> pCharts, boolean pNullValueOnMouseExit, ClosestDataPointFunction<X, Y> pClosestDataPointFunction) -
createClosestDataPointHandler
public static <X,Y> javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> createClosestDataPointHandler(javafx.scene.chart.LineChart<X, Y> pChart, boolean pNullValueOnMouseExit, Consumer<javafx.scene.chart.XYChart.Data<X, Y>> pClosestDataPointConsumer) -
createClosestDataPointHandler
public static <X,Y> javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> createClosestDataPointHandler(javafx.scene.chart.LineChart<X, Y> pChart, boolean pNullValueOnMouseExit, Consumer<javafx.scene.chart.XYChart.Data<X, Y>> pClosestDataPointConsumer, ClosestDataPointFunction<X, Y> pClosestDataPointFunction) -
createClosestDataPointHandler
-
createClosestDataPointHandler
public static <X,Y> javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> createClosestDataPointHandler(List<javafx.scene.chart.LineChart<X, Y>> pCharts, boolean pNullValueOnMouseExit, Consumer<javafx.scene.chart.XYChart.Data<X, Y>> pClosestDataPointConsumer, ClosestDataPointFunction<X, Y> pClosestDataPointFunction) -
getClosestDataPoint
public static <X,Y> javafx.scene.chart.XYChart.Data<X,Y> getClosestDataPoint(javafx.scene.chart.LineChart<X, Y> pChart, double pXPos, double pYPos) -
getClosestDataPoint
public static <X,Y> javafx.scene.chart.XYChart.Data<X,Y> getClosestDataPoint(List<javafx.scene.chart.LineChart<X, Y>> pCharts, double pXPos, double pYPos) -
getClosestDataPoint
public static <X,Y> javafx.scene.chart.XYChart.Data<X,Y> getClosestDataPoint(List<javafx.scene.chart.LineChart<X, Y>> pCharts, double pXPos, double pYPos, ClosestDataPointFunction<X, Y> pClosestDataPointFunction) -
displayClosestToMouseMarker
public static <X,Y> javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X,Y>> displayClosestToMouseMarker(javafx.scene.chart.LineChart<X, Y> pChart, boolean pHideOnMouseExit) -
displayClosestToMouseMarker
public static <X,Y> javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X,Y>> displayClosestToMouseMarker(javafx.scene.chart.LineChart<X, Y> pChart, boolean pHideOnMouseExit, ClosestDataPointFunction<X, Y> pClosestDataPointFunction) -
displayClosestToMouseMarker
public static <X,Y> javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X,Y>> displayClosestToMouseMarker(javafx.collections.ObservableList<javafx.scene.chart.LineChart<X, Y>> pCharts, boolean pHideOnMouseExit) -
displayClosestToMouseMarker
public static <X,Y> javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.chart.XYChart.Data<X,Y>> displayClosestToMouseMarker(javafx.collections.ObservableList<javafx.scene.chart.LineChart<X, Y>> pCharts, boolean pHideOnMouseExit, ClosestDataPointFunction<X, Y> pClosestDataPointFunction) -
displayMarker
public static <X,Y> void displayMarker(javafx.scene.chart.LineChart<X, Y> pChart, javafx.beans.value.ObservableValue<javafx.scene.chart.XYChart.Data<X, Y>> pMarkerProperty) -
displayPopup
public static <X,Y> void displayPopup(javafx.beans.value.ObservableValue<javafx.scene.chart.XYChart.Data<X, Y>> pData, Function<javafx.scene.chart.XYChart.Data<X, Y>, String> pToStringConverter) Shows a popup label for the specified data point using the specified string converter. -
displayPopup
public static <X,Y> void displayPopup(javafx.beans.value.ObservableValue<javafx.scene.chart.XYChart.Data<X, Y>> pData, Function<javafx.scene.chart.XYChart.Data<X, Y>, String> pToStringConverter, Function<javafx.scene.Node, javafx.collections.ObservableList<javafx.scene.Node>> pChildrenProvider) Shows a popup label for the specified data point using the specified string converter. -
updateGuideLineSizeAndLocation
public static <X,Y> void updateGuideLineSizeAndLocation(javafx.scene.chart.LineChart<X, Y> pChart, GuideLine<?> pGuideLine, javafx.geometry.Insets pInsets) -
updateGuideLineValue
public static <X,Y> void updateGuideLineValue(javafx.scene.chart.LineChart<X, Y> pChart, GuideLine<?> pGuideLine, javafx.scene.input.MouseEvent pEvt) -
updateGuideLineValue
public static <X,Y> void updateGuideLineValue(GuideLine<?> pGuideLine, javafx.scene.input.MouseEvent pEvt, GuideLineValueConverter<X> pXValueConverter, GuideLineValueConverter<Y> pYValueConverter) -
updateGuideLineValue
public static <T> void updateGuideLineValue(GuideLine<T> pGuideLine, javafx.scene.input.MouseEvent pEvt, GuideLineValueConverter<T> pValueConverter) -
updateGuideLineValue
public static <T> void updateGuideLineValue(GuideLine<T> pGuideLine, double pLocation, GuideLineValueConverter<T> pValueConverter) -
getDifferentStrokesForSeriesLinesCss
-
useDifferentColorsForSeriesLines
public static <X,Y> void useDifferentColorsForSeriesLines(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X, Y>> pSeriesData, String pColor) -
useDifferentStrokesForSeriesLines
public static <X,Y> void useDifferentStrokesForSeriesLines(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X, Y>> pSeriesData) -
setSeriesLineColor
public static <X,Y> void setSeriesLineColor(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X, Y>> pSeriesData, String pColor) -
setSeriesLineWidth
public static <X,Y> void setSeriesLineWidth(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X, Y>> pSeriesData, double pStrokeWidth) -
setSeriesLineStroke
public static <X,Y> void setSeriesLineStroke(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X, Y>> pSeriesData, ChartSeriesLineStroke pStroke) -
setSeriesLineStyle
public static <X,Y> void setSeriesLineStyle(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X, Y>> pSeriesData, IntFunction<String> pStyleProvider, Pattern pStylePattern) -
setStyle
- Parameters:
pStylePattern
- Pattern which will be used to replace existing style, if any.
-
getStrokeCss
-
getStrokeColorCss
-