public final class ChartUtil extends Object
Modifier and Type | Method and Description |
---|---|
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.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.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>> |
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>> |
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> 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> 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(javafx.scene.chart.LineChart<X,Y> pChart,
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) |
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 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, or
null , 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 type
ValueAxis 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 type
ValueAxis 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 |
setStyle(javafx.scene.Node pNode,
String pStyle,
Pattern pStylePattern) |
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) |
public static <X,Y> javafx.geometry.Point2D getDisplayPosition(javafx.scene.chart.XYChart<X,Y> pChart, javafx.scene.chart.XYChart.Data<X,Y> pDataPoint)
null
, if null
arguments are specified or the specified data point is not valid.public static <X,Y> Optional<javafx.geometry.Point2D> getDisplayPosition(javafx.scene.chart.XYChart.Data<X,Y> pData)
public static <X,Y> Optional<javafx.scene.chart.XYChart<X,Y>> getChart(javafx.scene.chart.XYChart.Data<X,Y> pData)
public static <X> String getXLabel(javafx.scene.chart.XYChart.Data<X,?> pData)
ValueAxis
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.public static <Y> String getYLabel(javafx.scene.chart.XYChart.Data<?,Y> pData)
ValueAxis
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.public static <T> String getLabel(javafx.scene.chart.Axis<T> pAxis, T pValue)
public static <T> Optional<javafx.util.StringConverter<T>> getTickLabelFormatter(javafx.scene.chart.Axis<T> pAxis)
public static <X,Y> void hideMarkers(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X,Y>> pSeriesList)
public static void installMouseHandler(javafx.scene.chart.LineChart<?,?> pChart, javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> pMouseHandler)
public static void uninstallMouseHandler(javafx.scene.chart.LineChart<?,?> pChart, javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> pMouseHandler)
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)
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)
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)
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)
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)
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)
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)
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)
public static <X,Y> javafx.scene.chart.XYChart.Data<X,Y> getClosestDataPoint(javafx.scene.chart.LineChart<X,Y> pChart, double pXPos, double pYPos)
public static <X,Y> javafx.scene.chart.XYChart.Data<X,Y> getClosestDataPoint(List<javafx.scene.chart.LineChart<X,Y>> pCharts, double pXPos, double pYPos)
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)
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)
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)
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)
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)
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)
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)
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)
public static <X,Y> void updateGuideLineSizeAndLocation(javafx.scene.chart.LineChart<X,Y> pChart, GuideLine<?> pGuideLine, javafx.geometry.Insets pInsets)
public static <X,Y> void updateGuideLineValue(javafx.scene.chart.LineChart<X,Y> pChart, GuideLine<?> pGuideLine, javafx.scene.input.MouseEvent pEvt)
public static <X,Y> void updateGuideLineValue(GuideLine<?> pGuideLine, javafx.scene.input.MouseEvent pEvt, GuideLineValueConverter<X> pXValueConverter, GuideLineValueConverter<Y> pYValueConverter)
public static <T> void updateGuideLineValue(GuideLine<T> pGuideLine, javafx.scene.input.MouseEvent pEvt, GuideLineValueConverter<T> pValueConverter)
public static <T> void updateGuideLineValue(GuideLine<T> pGuideLine, double pLocation, GuideLineValueConverter<T> pValueConverter)
public static String getDifferentStrokesForSeriesLinesCss(int pMaxSeriesCount)
public static <X,Y> void useDifferentColorsForSeriesLines(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X,Y>> pSeriesData, String pColor)
public static <X,Y> void useDifferentStrokesForSeriesLines(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X,Y>> pSeriesData)
public static <X,Y> void setSeriesLineColor(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X,Y>> pSeriesData, String pColor)
public static <X,Y> void setSeriesLineWidth(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X,Y>> pSeriesData, double pStrokeWidth)
public static <X,Y> void setSeriesLineStroke(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X,Y>> pSeriesData, ChartSeriesLineStroke pStroke)
public static <X,Y> void setSeriesLineStyle(javafx.collections.ObservableList<javafx.scene.chart.XYChart.Series<X,Y>> pSeriesData, IntFunction<String> pStyleProvider, Pattern pStylePattern)
public static void setStyle(javafx.scene.Node pNode, String pStyle, Pattern pStylePattern)
pStylePattern
- Pattern which will be used to replace existing style, if any.public static String getStrokeCss(javafx.scene.Node pNode)
public static String getStrokeColorCss(javafx.scene.Node pNode)
Copyright © 2023. All rights reserved.