C# Класс 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 );
Наследование: System.Windows.Forms.Control
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
InitializeComponent void
UpdateYRange void

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
InitializeComponent ( ) : void

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

UpdateYRange ( ) : void

Update Y range.

Описание методов

AddWaveform() публичный метод

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.
Результат void

AddWaveform() публичный метод

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.
Результат void

Dispose() защищенный метод

Dispose the object.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

OnBackColorChanged() защищенный метод

Raises the E:System.Windows.Forms.Control.BackColorChanged event.
protected OnBackColorChanged ( EventArgs e ) : void
e System.EventArgs An that contains the event data.
Результат void

OnPaint() защищенный метод

Paints the control.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
Результат void

OnPaintBackground() защищенный метод

Paints the background of the control.
protected OnPaintBackground ( PaintEventArgs pevent ) : void
pevent PaintEventArgs A that contains information about the control to paint.
Результат void

RemoveAllWaveforms() публичный метод

Remove all waveforms from the chart.
public RemoveAllWaveforms ( ) : void
Результат void

RemoveWaveform() публичный метод

Remove a Waveform from the chart.
public RemoveWaveform ( string name ) : void
name string Waveform name to remove.
Результат void

UpdateWaveform() публичный метод

Update Waveform on the chart.
public UpdateWaveform ( string name, float data ) : void
name string Data series name to update.
data float Data series values.
Результат void

UpdateWaveform() публичный метод

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.
Результат void

Wavechart() публичный метод

Initializes a new instance of the Wavechart class.
public Wavechart ( ) : System
Результат System