i solved
<pre lang="vb">
Imports ZedGraph
Public Class Form6
Dim frames As Integer
Dim time1 As TimeSpan()
Dim str As String
Public Sub New(ByVal no_frame As Integer, ByVal time() As TimeSpan)
InitializeComponent()
frames = no_frame
time1 = time
End Sub
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
CreateGraph(ZedGraphControl1)
SetSize()
End Sub
Private Sub CreateGraph(ByVal zgc As ZedGraphControl)
Dim myPane As GraphPane = zgc.GraphPane
myPane.Title.Text = "Waste of Bandwidth in Stop and Wait Protocol"
myPane.XAxis.Title.Text = "No of Frames"
myPane.YAxis.Title.Text = "Time"
'myPane.YAxis.Type = AxisType.Date
'myPane.YAxis.Scale.Format = "HH:mm:ss:fff"
' Make up some data points from the Sine function
Dim list = New PointPairList()
Dim x As Double
Dim y(100) As Double
For x = 1 To frames
y(x) = (Convert.ToDouble(time1(x).TotalSeconds))
list.Add(x, y(x))
Next x
' Generate a blue curve with circle symbols, and "My Curve 2" in the legend
Dim myCurve As LineItem = myPane.AddCurve("My Curve", list, Color.Blue, SymbolType.Circle)
' Fill the area under the curve with a white-red gradient at 45 degrees
myCurve.Line.Fill = New Fill(Color.White, Color.Red, 45.0F)
' Make the symbols opaque by filling them with white
myCurve.Symbol.Fill = New Fill(Color.White)
' Fill the axis background with a color gradient
myPane.Chart.Fill = New Fill(Color.White, Color.LightGoldenrodYellow, 45.0F)
' Fill the pane background with a color gradient
myPane.Fill = New Fill(Color.White, Color.FromArgb(220, 220, 255), 45.0F)
' Calculate the Axis Scale Ranges
zgc.AxisChange()
End Sub
Private Sub Form1_Resize(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Resize
SetSize()
End Sub
Private Sub SetSize()
ZedGraphControl1.Location = New Point(10, 10)
' Leave a small margin around the outside of the control
ZedGraphControl1.Size = New Size(ClientRectangle.Width - 20, ClientRectangle.Height - 20)
End Sub
End Class