ChartDirector 7.1 (C++ Edition)

SurfaceChart.getValuesAtPixel


Usage

DoubleArray getValuesAtPixel(int x, int y);

Description

Gets the (x, y, z, w) values of the surface at the specified image pixel coordinates.

This method is valid only after the chart image has been drawn (eg. using BaseChart.makeChart, BaseChart.makeChart2 or BaseChart.makeChart3). It is typically used to provide user feedback when the mouse moves on the chart.

If w values are not provided to the surface chart, the returned w value will be set to the same as the z value. If the pixel is not on the plotted surface, the returned array will be empty or null.

Arguments

ArgumentDefaultDescription
x(Mandatory)The x pixel coordinate.
y(Mandatory)The y pixel coordinate.

Return Value

An array of 4 numbers representing the x, y, z and w values at the image pixel location. If the pixel is not on the plotted surface, the returned array will be empty or null.