Windows Forms \ Chart Gallery \ Stock \ Stock Data Grouping
Wpf \ Chart Gallery \ Stock \ Stock Data Grouping
Web Forms \ Chart Gallery \ Stock \ Stock Data Grouping
The stock series has a feature called stock data grouping, which allows to group stock data at specific time intervals in order to increase the legibility and performance of the chart. The stock data grouping is controlled from the GroupingMode property of the stock series that accepts values from the StockGroupingMode enum. The following table shows the different values of this enum:
StockGroupingMode | Description |
None | No grouping is performed. |
AutoDateTimeSpan | The grouping is performed using an automatically generated time span. The MinAutoGroupLength controls the distance at which the automatically generated step for grouping will sample the input data. |
CustomDateTimeSpan | The grouping is performed using a custom specified time span. The CustomGroupStep property specifies the data time span used for stock data grouping. |
SynchronizeWithMajorTick | The grouping is performed using a time spans synchronized with the x axis major ticks. |
The following code snippet shows how to apply stock data grouping at one month interval:
C# |
Copy Code
|
---|---|
stock.GroupingMode = StockGroupingMode.CustomDateTimeSpan; stock.CustomGroupStep = new NDateTimeSpan(1, NDateTimeUnit.Month); |
Visual Basic |
Copy Code
|
---|---|
stock.GroupingMode = StockGroupingMode.CustomDateTimeSpan stock.CustomGroupStep = New NDateTimeSpan(1, NDateTimeUnit.Month) |
Windows Forms \ Chart Gallery \ Stock \ Stock Data Grouping
Wpf \ Chart Gallery \ Stock \ Stock Data Grouping
Web Forms \ Chart Gallery \ Stock \ Stock Data Grouping