ChartDirector 7.1 (C++ Edition)

Layer.setXData2


Usage

void setXData(double minValue, double maxValue);

Description

Sets the x values of the data points in the data sets as evenly distributed in a range.

This method is most useful when two layers contain data at different x-axis scale. An example is a line layer with one data point per minute, and another line layer with one data point per 5 minutes.

In the above example, in one hour, the first layer will have 60 data points, while the second layer will have 12 data points. If enumerated x-scale is used, the x-axis will contain 60 positions evenly distributed. The 60 data points in the first layer will corresponds to the 60 positions in the x-axis, which is correct. However, the 12 data points in the second layer will corresponds to the first 12 positions on the x-axis, which is not the desired result.

Instead, the 12 data points in the second layer should corresponds to positions 0, 5, 10, 15, .... A little thought will review that the 12 data points in the second layer should be distributed evenly among positions 0 - 55. The setXData2 method can be used to inform ChartDirector about the scaling used in the second layer.

Arguments

ArgumentDefaultDescription
minValue(Mandatory)The x value of the first point in a data set.
maxValue(Mandatory)The x value of the last point in the data set.

Return Value

None