public class XYChartCrosshair<X,Y>
extends java.lang.Object
XYChart and handles selection of a portion of the chart view.| Type | Property and Description |
|---|---|
javafx.beans.property.Property<X> |
currentXValue |
javafx.beans.property.BooleanProperty |
horizontalMarkerVisible
Gets the boolean property that tracks the visibility of the horizontal marker of the crosshair
|
javafx.beans.property.BooleanProperty |
verticalMarkerVisible
Gets the boolean property that tracks the visibility of the vertical marker of the crosshair
|
| Constructor and Description |
|---|
XYChartCrosshair(java.util.LinkedHashMap<javafx.scene.chart.XYChart<X,Y>,java.util.function.Function<Y,java.lang.String>> charts,
javafx.scene.layout.Pane parent,
java.util.function.Function<X,java.lang.String> xValuesFormatter)
Initializes a new instance of the
XYChartCrosshair class. |
| Modifier and Type | Method and Description |
|---|---|
javafx.beans.property.Property<X> |
currentXValueProperty() |
X |
getCurrentXValue()
Gets the value of the property currentXValue.
|
Y |
getCurrentYValue(javafx.scene.chart.XYChart<X,Y> chart) |
javafx.beans.property.BooleanProperty |
horizontalMarkerVisibleProperty()
Gets the boolean property that tracks the visibility of the horizontal marker of the crosshair
|
boolean |
isHorizontalMarkerVisible()
Returns true if the horizontal marker is visible, false otherwise
|
boolean |
isVerticalMarkerVisible()
Returns true if the vertical marker is visible, false otherwise
|
void |
onSelectionDone(java.util.function.Consumer<java.util.Map<javafx.scene.chart.XYChart<X,Y>,XYChartSelection<X,Y>>> action)
Sets the action to be triggered when selection is complete
|
void |
setHorizontalMarkerVisible(boolean horizontalMarkerVisible)
Sets the visibility of the horizontal marker
|
void |
setVerticalMarkerVisible(boolean verticalMarkerVisible)
Sets the visibility of the vertical marker
|
javafx.beans.property.BooleanProperty |
verticalMarkerVisibleProperty()
Gets the boolean property that tracks the visibility of the vertical marker of the crosshair
|
public javafx.beans.property.BooleanProperty verticalMarkerVisibleProperty
public javafx.beans.property.BooleanProperty horizontalMarkerVisibleProperty
public javafx.beans.property.Property<X> currentXValueProperty
getCurrentXValue()public XYChartCrosshair(java.util.LinkedHashMap<javafx.scene.chart.XYChart<X,Y>,java.util.function.Function<Y,java.lang.String>> charts, javafx.scene.layout.Pane parent, java.util.function.Function<X,java.lang.String> xValuesFormatter)
XYChartCrosshair class.charts - a map of the XYChart to attach and their formatting function of the Y values.parent - the parent node of the chartxValuesFormatter - a function used to format the display of X values as stringspublic javafx.beans.property.BooleanProperty verticalMarkerVisibleProperty()
public javafx.beans.property.BooleanProperty horizontalMarkerVisibleProperty()
public boolean isVerticalMarkerVisible()
public boolean isHorizontalMarkerVisible()
public void setVerticalMarkerVisible(boolean verticalMarkerVisible)
verticalMarkerVisible - the visibility of the vertical markerpublic void setHorizontalMarkerVisible(boolean horizontalMarkerVisible)
horizontalMarkerVisible - the visibility of the horizontal markerpublic void onSelectionDone(java.util.function.Consumer<java.util.Map<javafx.scene.chart.XYChart<X,Y>,XYChartSelection<X,Y>>> action)
action - the action to be triggered when selection is completepublic X getCurrentXValue()
public javafx.beans.property.Property<X> currentXValueProperty()
getCurrentXValue()Copyright © 2018 Frederic Thevenet. All rights reserved.