ChartDirector 7.0 (ASP/COM/VB Edition)

SurfaceChart.setInterpolation


Usage

setInterpolation(xSamples [, ySamples [, isSmooth [, isColorSmooth ]]])

Description

Enables and sets the degree and method of interpolation of the data points.

A surface chart consists of planar patches, drawn using the data points as the vertices. To create visually smooth surfaces, we may use a large number of small planar patches. However, this requires a large number of data points.

For example, consider a plot region of which the x and y dimensions are both 400 pixels in length. To create a smooth surface, if gridded data are used, the distance between grid lines should be no more than a few pixels. Suppose a grid spacing of 8 pixels is used. The grid size will be 51 x 51, and 2601 data points will be needed.

If the number of available data points are too small to create a smooth surface, This method can be used to generate a denser grid of data points from the original data points using interpolation.

Two types of interpolation are supported. In spline surface interpolation, ChartDirector will compute a smooth surface that passes through the original data points, and sample the spline surface for the new data points. In bilinear/linear interpolation, ChartDirector will apply bilinear/linear interpolation to its vertices of the original patches to compute the new data points.

Arguments

ArgumentDefaultDescription
xSamples(Mandatory)The number of samples on the x-dimension to interpolate to.
ySamples-1The number of samples on the y-dimension to interpolate to. -1 means it is the same as xSamples.
isSmoothtrue (non-zero)A true (non-zero) value means to use spline surface interpolation for the z values. A false (zero) value means to use bilinear/linear interpolation.
isColorSmooth(Optional)A true (non-zero) value means to use spline surface interpolation for the w values. A false (zero) value means to use bilinear/linear interpolation. If this argument is not specified, the default is to use the same interpolation method as the z values.

Return Value

None