ChartDirector 7.0 (Java Edition)

Layer.getYCoor


Usage

public int getYCoor(double v [, Axis yAxis ])

Description

Gets the y pixel coordinate given the y data value.

This method only accepts numeric values as input. If the axis scale is a date/time scale, and you are using a java.util.Date value, please use Chart.CTime to convert it to a number.

Note: This method should be used only after ChartDirector has output the chart image, or after XYChart.layoutAxes, BaseChart.layout or XYChart.packPlotArea has been called. ChartDirector needs to perform auto- scaling and layout the axis before it can convert between pixel coordinates and data values.

Arguments

ArgumentDefaultDescription
v(Mandatory)The y data value.
yAxis[Null]The y-axis to use to determine the pixel coordinates of data values. The y-axis may be obtained using XYChart.yAxis, XYChart.yAxis2 or XYChart.addAxis. The default is to use the primary y-axis.

For backward compatibility, the axis argument can also be a boolean value. A true value means the primary y-axis. A false value means the secondary y-axis.

Return Value

The y pixel coordinate of the y data value.