public class XYChartInfo extends Object
XYChart
. Most of the methods deal with
locating components of the chart in the coordinate space of the reference node. The reference
node could be the chart itself or an ancestor of the chart.
There is a current limitation of this class in that there must not be scaling or rotation
transformations between the reference node and the chart's axes. Therefore, the reference node
is best when it is the chart itself or an immediate parent of the chart.Constructor and Description |
---|
XYChartInfo(javafx.scene.chart.XYChart<?,?> chart)
Constructs the XYChartInfo to find chart information in the chart's coordinate system.
|
XYChartInfo(javafx.scene.chart.XYChart<?,?> chart,
javafx.scene.Node referenceNode)
Constructs the XYChartInfo to find chart information in the reference node's coordinate
system.
|
Modifier and Type | Method and Description |
---|---|
javafx.scene.chart.XYChart<?,?> |
getChart() |
javafx.geometry.Point2D |
getDataCoordinates(double x,
double y)
Given graphical coordinates in the reference's coordinate system, returns x and y axis value as
a point via the
Axis.getValueForDisplay(double) and Axis.toNumericValue(Object)
methods. |
javafx.geometry.Rectangle2D |
getDataCoordinates(double minX,
double minY,
double maxX,
double maxY)
Given graphical coordinates in the reference's coordinate system, returns x and y axis value as
a point via the
Axis.getValueForDisplay(double) and Axis.toNumericValue(Object)
methods. |
javafx.geometry.Rectangle2D |
getPlotArea()
Returns the plot area in the reference's coordinate space.
|
javafx.scene.Node |
getReferenceNode() |
javafx.geometry.Rectangle2D |
getXAxisArea()
Returns the X axis area in the reference's coordinate space.
|
javafx.geometry.Rectangle2D |
getYAxisArea()
Returns the Y axis area in the reference's coordinate space.
|
boolean |
isInPlotArea(double x,
double y)
Returns true if the given x and y coordinate in the reference's coordinate system is in the
chart's plot area, based on the xAxis and yAxis locations.
|
public XYChartInfo(javafx.scene.chart.XYChart<?,?> chart, javafx.scene.Node referenceNode)
public XYChartInfo(javafx.scene.chart.XYChart<?,?> chart)
public javafx.scene.chart.XYChart<?,?> getChart()
public javafx.scene.Node getReferenceNode()
public javafx.geometry.Point2D getDataCoordinates(double x, double y)
Axis.getValueForDisplay(double)
and Axis.toNumericValue(Object)
methods.public javafx.geometry.Rectangle2D getDataCoordinates(double minX, double minY, double maxX, double maxY)
Axis.getValueForDisplay(double)
and Axis.toNumericValue(Object)
methods.minX
- lower X value (upper left point)minY
- lower Y value (upper left point)maxX
- upper X value (bottom right point)maxY
- upper Y value (bottom right point)public boolean isInPlotArea(double x, double y)
public javafx.geometry.Rectangle2D getPlotArea()
public javafx.geometry.Rectangle2D getXAxisArea()
public javafx.geometry.Rectangle2D getYAxisArea()
Copyright © 2013 Jason Winnebeck. All Rights Reserved.