ChartDirector 7.0 (Python Edition)

SurfaceChart.getValuesAtPixel


Usage

getValuesAtPixel(x, 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 or BaseChart.makeChart2). 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.