AForge.Controls.Chart.AddDataSeries C# (CSharp) Method

AddDataSeries() public method

Add data series to the chart.

Adds new empty data series to the collection of data series. To update this series the UpdateDataSeries method should be used.

The meaning of the width parameter depends on the data series type: Line - width of the line; Dots - size of dots (rectangular dots with specified width and the same height); Connected dots - size of dots (dots are connected with one pixel width line).

public AddDataSeries ( string name, Color color, SeriesType type, int width ) : void
name string Data series name.
color Color Data series color.
type SeriesType Data series type.
width int Width (depends on the data series type, see remarks).
return void
        public void AddDataSeries( string name, Color color, SeriesType type, int width )
        {
            AddDataSeries( name, color, type, width, true );
        }

Same methods

Chart::AddDataSeries ( string name, Color color, SeriesType type, int width, bool updateYRange ) : void

Usage Example

Example #1
0
        // Constructor
        public MainForm()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            // init chart control
            chart.AddDataSeries("data", Color.Red, Chart.SeriesType.Dots, 5);
            chart.AddDataSeries("solution", Color.Blue, Chart.SeriesType.Line, 1);

            // init controls
            UpdateSettings();
        }
All Usage Examples Of AForge.Controls.Chart::AddDataSeries