ChartDirector 7.1 (.NET Edition)

SurfaceChart.getValuesAtPixel


Usage

[C#]public double[] getValuesAtPixel(int x, int y);
[VB]Public Function getValuesAtPixel(x As Integer, y As Integer) As Double()

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.makeWebImage, BaseChart.makeImage or BaseChart.makeChart). 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.