ChartDirector 7.1 (C++ Edition)

XYChart.getXCoor


Usage

int getXCoor(double v) const;

Description

Gets the x pixel coordinate given the x data value.

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.

For an XYChart with 3D layers, this method will get the pixel coordinate of the data value on the top layer of the chart. Use Layer.getXCoor to obtain the pixel coordinate of the data value on a particular chart layer.

Arguments

ArgumentDefaultDescription
v(Mandatory)The x data value.

Return Value

The x pixel coordinate of the x data value.