Find, i've find. It's very fun and very easy. Thank a lot for this library.
I give you my vb code
Public Class Mesure
<Window x:Class="Fene_Courbe"
Fene_Courbe.xaml.vb
Imports OxyPlot
Imports OxyPlot.Series
Imports System.Collections
Imports System.Collections.Generic
Imports System.Linq
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation
Imports System.Windows.Shapes
Public Class Fene_Courbe
I give you my vb code
Public Class Mesure
Implements INotifyPropertyChanged
Private _Temps As Double
Private _Mesure1 As Double
Private _Mesure2 As Double
Private _Mesure3 As Double
Public Sub New()
_Temps = 0.0
_Mesure1 = 0.0
_Mesure2 = 0.0
_Mesure3 = 0.0
End Sub
Public Overrides Function ToString() As String
Return Format(_Temps, "{0:##0.00}") & " " & Format(_Mesure1, "{1:# ##0.00}") & " " & Format(_Mesure2, "{2:# ##0.00}") & " " & Format(_Mesure3, "{3:# ##0.00}")
End Function
Private Sub NotifyPropertyChanged(<CallerMemberName()> Optional ByVal propertyName As String = Nothing)
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
End Sub
Public Property Temps() As Double
Get
Return _Temps
End Get
Set(ByVal value As Double)
_Temps = value
NotifyPropertyChanged()
End Set
End Property
Public Property Mesure1() As Double
Get
Return _Mesure1
End Get
Set(ByVal value As Double)
_Mesure1 = value
NotifyPropertyChanged()
End Set
End Property
Public Property Mesure2() As Double
Get
Return _Mesure2
End Get
Set(ByVal value As Double)
_Mesure2 = value
NotifyPropertyChanged()
End Set
End Property
Public Property Mesure3() As Double
Get
Return _Mesure3
End Get
Set(ByVal value As Double)
_Mesure3 = value
NotifyPropertyChanged()
End Set
End Property
Public Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged
End Class
MainWindow.xaml.vb Public Mesures As New Collection(Of Mesure)
.....
For k As Double = 0 To 1 Step 0.00001
Mesures.Add(New Mesure With {.Temps = k, .Mesure1 = Sin(15 * k) * 500, .Mesure2 = Cos(10 * k) * 250, .Mesure3 = Sin(8 * k) * 100)
Next k
......
Fene_Courbe.xaml<Window x:Class="Fene_Courbe"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="COURBES" Height="600" Width="800" Closing="Window_Closing_1" Topmost="True"
xmlns:oxy="clr-namespace:OxyPlot;assembly=OxyPlot"
xmlns:oxywpf="clr-namespace:OxyPlot.Wpf;assembly=OxyPlot.Wpf" SourceInitialized="Window_SourceInitialized_1">
<Grid>
<oxywpf:Plot x:Name="Courbes" Title="Courbes" Background="Beige">
<oxywpf:LineSeries x:Name="PR1" Color="Red" Title="PR1" DataFieldX="Temps" DataFieldY="Mesure1" ItemsSource="{Binding Mesures}" ></oxywpf:LineSeries>
<oxywpf:LineSeries x:Name="PR2" Color="Blue" Title="PR2" DataFieldX="Temps" DataFieldY="Mesure2" ItemsSource="{Binding Mesures}" ></oxywpf:LineSeries>
<oxywpf:LineSeries x:Name="DB1" Color="Green" Title="DB1" DataFieldX="Temps" DataFieldY="Mesure3" ItemsSource="{Binding Mesures}" ></oxywpf:LineSeries>
</oxywpf:Plot>
</Grid>
</Window>Fene_Courbe.xaml.vb
Imports OxyPlot
Imports OxyPlot.Series
Imports System.Collections
Imports System.Collections.Generic
Imports System.Linq
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation
Imports System.Windows.Shapes
Public Class Fene_Courbe
Private Sub Window_SourceInitialized_1(sender As Object, e As EventArgs)
Courbes.Series().Item(0).ItemsSource = Mesures
Courbes.Series().Item(1).ItemsSource = Mesures
Courbes.Series().Item(2).ItemsSource = Mesures
End Sub
End Class