I use this code to add a bar to a graph:
It works almost: the only problem I have is that every time I call the sub, the existing bar becomes thinner:
1st call:
2nd call:
3th call:
Any help would be appreciated
.
VB.NET:
Private Sub UpdateGraph(ByVal YValue As Double)
Static PPList As New ZedGraph.PointPairList
Dim PPDrawList As New ZedGraph.PointPairList
Dim X As Double
If PPList.Count <> 0 Then
X = PPList.Item(PPList.Count - 1).X
Else
X = -1
End If
PPList.Add(X + 1, YValue)
PPDrawList.Add(X + 1, YValue)
zgcGraph.GraphPane.AddBar("", PPDrawList, Color.DarkRed)
zgcGraph.Refresh()
End Sub
It works almost: the only problem I have is that every time I call the sub, the existing bar becomes thinner:
1st call:
2nd call:
3th call:
Any help would be appreciated