title: how to draw line graph using listbox values
body: <p>I was looking for the answer to my question but all codes I tried didn't work for me so I decided to ask for help.
  I am newbie with making charts in VB.net and my boss wants results (by yesterday) so I don't have time to dig deeper into how to make charts.</p>
  
  <pre><code>Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
  
  Dim a As Double
  Dim b As String
  b = RichTextBox1.Text
  a = Convert.ToDouble(b)
  'Chart1.DataBindTable(b)
  ' Chart1.(RichTextBox1.Text)
  'Chart1.Series("Series1").Points.DataBindY(RichTextBox1.Text)
  'Convert.ToInt32(b, 0)
  Chart1.DataSource = RichTextBox1.Text
  'Chart1.Series("Series1").Points.DataBindY(RichTextBox1.Text)
  'Chart1.Series("Series1").Points.AddY(b)
  
  'Chart1.Series("Series1").YValueMembers = b
  Me.Chart1.Series("Series1").Points.AddY(a)
  'MsgBox(RichTextBox1.Text)
  MsgBox(a)
  'Me.Chart1.Series("Series1").Points.InsertY(b)
  
  Me.Refresh()
  
  End Sub
  
   Private Sub Form1_Load(sender As System.Object, e As System.EventArgs)     Handles MyBase.Load
  
   End Sub
  </code></pre>
  
  <p>I would like to draw a line graph.
  I have a listbox with 10 numbers and a button. I would like to make a line chart from those numbers.<br>
  I also tried to use richtextbox instead of the listbox but no luck.
  I would like to get something like the attached picture.</p>
  
  <p>Thank you so much for help.
  <a href="https://i.stack.imgur.com/HP2dq.jpg" rel="nofollow">sample made in excel</a></p>