Nevron .NET Vision Documentation
Basic Series Functionality

All series types derive from the NSeriesBase class, which provides the following basic series functionality:
Visibility control
When a series is marked as hidden it is not displayed and does not affect the scale of the axes. The visibility is easily controlled with the help of the Visible property.
Name of the series
The name of the series can be displayed in the legend associated with the chart. Programmatically the name of the series can be modified with the help of the Name property.
Margins control
The series can be instructed to inflate its margins in order to fit in the chart area. This feature is very useful if you intend to display a chart, which is likely to be displayed partially outside of the charting area (bubble chart for example). Programmatically you can instruct the series to inflate its margins with the help of the InflateMargins property.
Integration of the series in the chart legend
Each series displayed by a particular chart can add some descriptive information about itself in a legend. This functionality is exposed by the NSeriesLegend object. This object is accessible through the Legend property. See the Legend Data  topic for more information.
Series interactivity
The default interactivity features of the series can be managed through the InteractivityStyle property. It exposes a NInteractivityStyle that controls the default tooltip, cursor and URL link for the series.
Scaling of the series on one or more standard or custom X and Y axes

You can scale the series on the standard and custom X and Y axes. The series is always scaled on the depth axis. The series scaling functionality is exposed through the following methods:

DisplayOnAxis - controls whether the series is scaled on a particular axis.
IsDisplayedOnAxis - queries whether the series is scaled on the specified axis.

For example a bar chart can be scaled on the secondary vertical axis with the following code:

C#
Copy Code
bar.DisplayOnAxis(StandardAxis.SecondaryY, true);
Visual Basic
Copy Code
bar.DisplayOnAxis(StandardAxis.SecondaryY, True)

You can remove the same bar from scaling on the PrimaryY axis with the following code:

C#
Copy Code
bar.DisplayOnAxis(StandardAxis.PrimaryY, false);
Visual Basic
Copy Code
bar.DisplayOnAxis(StandardAxis.PrimaryY, False)
Ability to selectively extract the data series contained by the series

Most of the general data manipulation routines (Sorting, Importing etc.) operate on a number of logically connected data series contained in a NDataSeriesCollection. You can easily create a collection of these data series with just one function call. This is achieved with help of the GetDataSeries virtual method defined in the NSeriesBase class. You can specify which series should be included and which series should be explicitly excluded. The last argument - ForceAlign - determines whether the data series sizes must be aligned to the largest size.

For example suppose that you want to obtain a data series collection containing the open, high, low and close data series that a stock chart uses. You can do that in two ways:

1. Explicitly specify which series must be contained in the collection:

C#
Copy Code
NDataSeriesCollection arrDataSeries;
arrDataSeries = stock.GetDataSeries(
DataSeriesMask.StockOpenValues | 
DataSeriesMask.StockHighValues | 
DataSeriesMask.StockLowValues | 
DataSeriesMask.StockCloseValues, DataSeriesMask.None, false);
Visual Basic
Copy Code
arrDataSeries = stock.GetDataSeries( _
 DataSeriesMask.StockOpenValues Or _
 DataSeriesMask.StockHighValues Or _
 DataSeriesMask.StockLowValues Or _
 DataSeriesMask.StockCloseValues, DataSeriesMask.None, False)

2. Include all data series by default, but explicitly exclude all other except the Open, High, Low and Close data series:

C#
Copy Code
NDataSeriesCollection arrDataSeries;
arrDataSeries = stock.GetDataSeries(DataSeriesMask.All,
DataSeriesMask.FillStyles |
DataSeriesMask.StrokeStyles |
DataSeriesMask.MarkerStyles |
DataSeriesMask.DataLabelStyles |
DataSeriesMask.InteractivityStyles |
DataSeriesMask.Tags |
DataSeriesMask.Labels |
DataSeriesMask.XValues, false);
Visual Basic
Copy Code
Dim arrDataSeries As NDataSeriesCollection
arrDataSeries = stock.GetDataSeries(DataSeriesMask.All, _
 DataSeriesMask.FillStyles Or _
 DataSeriesMask.StrokeStyles Or _
 DataSeriesMask.MarkerStyles Or _
 DataSeriesMask.DataLabelStyles Or _
 DataSeriesMask.InteractivityStyles Or _
 DataSeriesMask.Tags Or _
 DataSeriesMask.Labels Or _
 DataSeriesMask.XValues, False)
It is important to remember that internally the component checks whether the series, which will be present in the NDataSeriesCollection object are aligned when you try to export it to a DataTable. In this case you can either set the ForceAlign to true when you obtain the collection from the series or explicitly align the collection with the help of the Align method.
See Also

 

 


©2017. Nevron Software LLC.

Send Feedback