Dim oaDatetimes As New List(Of Double) For i = 0 To BaseTicker.MinuteTimeData.DateTimeList.Count - 1 oaDatetimes.Add(BaseTicker.MinuteTimeData.DateTimeList(i).ToOADate) Next SeriesPrice.GetType().GetProperty("ActualXValues", BindingFlags.GetProperty Or BindingFlags.NonPublic Or BindingFlags.Instance).SetValue(SeriesPrice, oaDatetimes) 'SET Y VALUES Dim yDoubleValues As New List(Of Double) For i = 0 To BaseTicker.MinuteTimeData.SingleLists(0).Count - 1 yDoubleValues.Add(CType(BaseTicker.MinuteTimeData.SingleLists(0)(i), Double)) Next SeriesPrice.GetType().GetProperty("YValues", BindingFlags.GetProperty Or BindingFlags.NonPublic Or BindingFlags.Instance).SetValue(SeriesPrice, yDoubleValues)
Private Sub BtLoadData_Click(sender As Object, e As RoutedEventArgs) Handles btLoadData.Click
#Region "METHOD 2 - SET DATAPOINTS MANUALLY"
..
SeriesPrice.GetType().GetProperty("YValues", BindingFlags.GetProperty Or BindingFlags.NonPublic Or BindingFlags.Instance).SetValue(SeriesPrice, yDoubleValues)
SeriesPrice.CreateSegments()
Dim method As MethodInfo = GetType(ChartBase).GetMethod("ScheduleUpdate", BindingFlags.NonPublic Or BindingFlags.Instance)
method.Invoke(chart, Nothing)
#End Region
ZoomX()
End Sub
|
Public Overrides Sub CreateSegments()
Segments.Clear()
If Segments.Count = 0 Then '60
………
GetType(ChartSeriesBase).GetProperty("DataCount", BindingFlags.GetProperty Or BindingFlags.Instance Or BindingFlags.Public).SetValue(Me, YValues.Count)
End If
End Sub
Protected Overrides Sub ClearUnUsedSegments(startIndex As Integer)
End Sub
|
Public Overrides Sub CreateSegments()
…….
Dim method As MethodInfo = GetType(FastStepLineBitmapSegment).GetMethod("SetRange", BindingFlags.NonPublic Or BindingFlags.Instance)
method.Invoke(customSegment, Nothing)
…..
End Sub
|
Public Overrides Sub CreateSegments()
……
Dim seriesYValues As IList(Of Double)() = New IList(Of Double)() {YValues}
GetType(ChartSeriesBase).GetProperty("ActualSeriesYValues", BindingFlags.GetProperty Or BindingFlags.Instance Or BindingFlags.NonPublic).SetValue(Me, seriesYValues)
…..
End Sub |