C# 클래스 AForge.Controls.Chart

Chart control.

The chart control allows to display multiple charts at time of different types: dots, lines, connected dots.

Sample usage:

// create data series array double[,] testValues = new double[10, 2]; // fill data series for ( int i = 0; i < 10; i++ ) { testValues[i, 0] = i; // X values testValues[i, 1] = Math.Sin( i / 18.0 * Math.PI ); // Y values } // add new data series to the chart chart.AddDataSeries( "Test", Color.DarkGreen, Chart.SeriesType.ConnectedDots, 3 ); // set X range to display chart.RangeX = new AForge.Range( 0, 9 ); // update the chart chart.UpdateDataSeries( "Test", testValues );
상속: System.Windows.Forms.Control
파일 보기 프로젝트 열기: holisticware-admin/MonoVersal.AForgeNET 1 사용 예제들

Private Properties

프로퍼티 타입 설명
Chart_Paint void
InitializeComponent void
UpdateYRange void

공개 메소드들

메소드 설명
AddDataSeries ( string name, Color color, SeriesType type, int width ) : void

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).

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

Add data series to the chart.

Adds new empty data series to the collection of data series.

The updateYRange parameter specifies if the data series may affect displayable Y range. If the value is set to false, then displayable Y range is not updated, but used the range, which was specified by user (see RangeY property). In the case if the value is set to true, the displayable Y range is recalculated to fully fit the new data series.

Chart ( ) : System

Initializes a new instance of the Chart class.

RemoveAllDataSeries ( ) : void

Remove all data series from the chart.

RemoveDataSeries ( string name ) : void

Remove data series from the chart.

UpdateDataSeries ( string name, double data ) : void

Update data series on the chart.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Dispose the object.

비공개 메소드들

메소드 설명
Chart_Paint ( object sender, PaintEventArgs e ) : void
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

UpdateYRange ( ) : void

Update Y range.

메소드 상세

AddDataSeries() 공개 메소드

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).
리턴 void

AddDataSeries() 공개 메소드

Add data series to the chart.

Adds new empty data series to the collection of data series.

The updateYRange parameter specifies if the data series may affect displayable Y range. If the value is set to false, then displayable Y range is not updated, but used the range, which was specified by user (see RangeY property). In the case if the value is set to true, the displayable Y range is recalculated to fully fit the new data series.

public AddDataSeries ( string name, Color color, SeriesType type, int width, bool updateYRange ) : 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).
updateYRange bool Specifies if should be updated.
리턴 void

Chart() 공개 메소드

Initializes a new instance of the Chart class.
public Chart ( ) : System
리턴 System

Dispose() 보호된 메소드

Dispose the object.
protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

RemoveAllDataSeries() 공개 메소드

Remove all data series from the chart.
public RemoveAllDataSeries ( ) : void
리턴 void

RemoveDataSeries() 공개 메소드

Remove data series from the chart.
public RemoveDataSeries ( string name ) : void
name string Data series name to remove.
리턴 void

UpdateDataSeries() 공개 메소드

Update data series on the chart.
public UpdateDataSeries ( string name, double data ) : void
name string Data series name to update.
data double Data series values.
리턴 void