C# Class Accord.Controls.Wavechart

Waveform chart control.

The Waveform chart control allows to display multiple waveforms at time.

Sample usage:

// create data series array float[] testValues = new float[128]; // fill data series for ( int i = 0; i < 128; i++ ) { testValues[i] = Math.Sin( i / 18.0 * Math.PI ); } // add new waveform to the chart chart.AddWaveform( "Test", Color.DarkGreen, 3 ); // update the chart chart.UpdateWaveform( "Test", testValues );
Inheritance: System.Windows.Forms.Control
Afficher le fichier Open project: accord-net/framework

Private Properties

Свойство Type Description
InitializeComponent void
UpdateYRange void

Méthodes publiques

Méthode Description
AddWaveform ( string name, Color color, int width ) : void

Add Waveform to the chart.

Adds new empty waveform to the collection of waves. To update this wave the UpdateWaveform(string, float[]) method should be used.

AddWaveform ( string name, Color color, int width, bool updateYRange ) : void

Add Waveform to the chart.

Adds new empty waveform to the collection of waves. To update this wave the UpdateWaveform(string, float[]) method should be used.

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

The updateYRange parameter specifies if the waveform 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.

RemoveAllWaveforms ( ) : void

Remove all waveforms from the chart.

RemoveWaveform ( string name ) : void

Remove a Waveform from the chart.

UpdateWaveform ( string name, float data ) : void

Update Waveform on the chart.

UpdateWaveform ( string name, float data, int samples ) : void

Update Waveform on the chart.

Wavechart ( ) : System

Initializes a new instance of the Wavechart class.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Dispose the object.

OnBackColorChanged ( EventArgs e ) : void

Raises the E:System.Windows.Forms.Control.BackColorChanged event.

OnPaint ( PaintEventArgs e ) : void

Paints the control.

OnPaintBackground ( PaintEventArgs pevent ) : void

Paints the background of the control.

Private Methods

Méthode Description
InitializeComponent ( ) : void

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

UpdateYRange ( ) : void

Update Y range.

Method Details

AddWaveform() public méthode

Add Waveform to the chart.

Adds new empty waveform to the collection of waves. To update this wave the UpdateWaveform(string, float[]) method should be used.

public AddWaveform ( string name, Color color, int width ) : void
name string Waveform name.
color Color Waveform color.
width int Waveform width.
Résultat void

AddWaveform() public méthode

Add Waveform to the chart.

Adds new empty waveform to the collection of waves. To update this wave the UpdateWaveform(string, float[]) method should be used.

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

The updateYRange parameter specifies if the waveform 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 AddWaveform ( string name, Color color, int width, bool updateYRange ) : void
name string Waveform name.
color Color Waveform color.
width int Waveform width.
updateYRange bool Specifies if should be updated.
Résultat void

Dispose() protected méthode

Dispose the object.
protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

OnBackColorChanged() protected méthode

Raises the E:System.Windows.Forms.Control.BackColorChanged event.
protected OnBackColorChanged ( EventArgs e ) : void
e System.EventArgs An that contains the event data.
Résultat void

OnPaint() protected méthode

Paints the control.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
Résultat void

OnPaintBackground() protected méthode

Paints the background of the control.
protected OnPaintBackground ( PaintEventArgs pevent ) : void
pevent PaintEventArgs A that contains information about the control to paint.
Résultat void

RemoveAllWaveforms() public méthode

Remove all waveforms from the chart.
public RemoveAllWaveforms ( ) : void
Résultat void

RemoveWaveform() public méthode

Remove a Waveform from the chart.
public RemoveWaveform ( string name ) : void
name string Waveform name to remove.
Résultat void

UpdateWaveform() public méthode

Update Waveform on the chart.
public UpdateWaveform ( string name, float data ) : void
name string Data series name to update.
data float Data series values.
Résultat void

UpdateWaveform() public méthode

Update Waveform on the chart.
public UpdateWaveform ( string name, float data, int samples ) : void
name string Data series name to update.
data float Data series values.
samples int The number of samples in the array.
Résultat void

Wavechart() public méthode

Initializes a new instance of the Wavechart class.
public Wavechart ( ) : System
Résultat System