Groups a series' data by axis labels using one or more formulas. The series is cleared of its original data, and then used to store the new data points.
Grouping by X value, when it’s a string (stored in AxisLabel property).
Visual Basic (Declaration) | |
---|---|
Public Overloads Sub GroupByAxisLabel( _ ByVal formula As String, _ ByVal inputSeries As Series _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public void GroupByAxisLabel( string formula, Series inputSeries ) |
Parameters
- formula
- The formula(s) to be used for calculating the "grouped" data point values. Multiple formulas can be specified by using comma-separated values.
Grouping formula. - inputSeries
- The Series to be grouped. Original values are cleared and the series then stores the new grouped values.
Input data series.
Visual Basic | Copy Code |
---|---|
Imports Dundas.Charting.WinControl |
Data points that have the exact same X-axis label (determined by the AxisLabel property) are grouped together into one data point. This new data point has Y-value(s) that are determined by the applied formula(s). Note that axis label comparisons are case sensitive.
The grouped data points are also sorted. For example, grouped data points with a "John" label will be displayed before grouped data points with a "Mark" label.
The first specified formula is the default, and is applied to all Y-values that are not calculated using subsequent formulas. Formulas specified after the default formula must have a "value" prefix to identify which value they should be applied to. For example, an expression of "SUM, Y2:AVE" means that an average of secondary Y-values will be calculated, and a sum of all other Y-values will be calculated. See Table1 for a listing of possible formulas and their descriptions.
Formulas are not applied to X-values, only to Y-values.
To group data by axis labels and preserve the original series use another definition of this function that has an outputSeries parameter.
All data points in the given series are grouped (i.e. it is not possible to group only some of a series' data points).
Empty data points will be ignored or treated as zeros, depending on the IgnoreEmptyPoints property (by default IgnoreEmptyPoints is True).
Formula | Description | Used for X-Value |
---|---|---|
AVE | The average value of all data points within the given interval. | No. |
MAX | The maximum value of all data points within the given interval. | No. |
MIN | The minimum value of all data points within the given interval. | No. |
SUM | The total value of all data points within the given interval. | No. |
LAST | The last value of all data points within the given interval. | Yes. New data points are drawn at the right-most margin of intervals. |
FIRST | The first value of all data points within the given interval. | Yes. New data points are drawn at the left-most margin of intervals. |
HiLoOpCl | Calculates the largest, smallest, opening and closing values. Opening value is the first value in the interval, while the closing value is the last value for the interval. NOTE: this formula returns four Y-values, and should only be used for chart types that use four Y-values (e.g. Candlestick charts) |
No. |
HiLo | The largest and smallest of all data points within the given interval. NOTE: this formula returns two Y-values, and should only be used for chart type that use two Y-values (e.g. Bubble charts). |
No. |
Count | The number of data points that have been grouped into one point. | No. |
DistinctCount | The number of data points that have been grouped into one point. Data points that have the same primary Y-values are considered one point. | No. |
Variance | The variance between all data points within the given interval. | No. |
Deviation | The deviation between all data points within the given interval. | No. |
Center | The deviation between all data points within the given interval. | Yes. New data points are drawn at the center of intervals. |
Table 1: Formulas.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family