ChartDirector 5.1 (.NET Edition)
Layer.setXData2
Usage
[VB] | Public Sub setXData@2(minValue As {Double | DateTime}, maxValue As {Double | DateTime}) |
[C#] | public void setXData@2({double | DateTime} minValue, {double | DateTime} 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
Argument | Default | Description |
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
© 2012 Advanced Software Engineering Limited. All rights reserved.