so I was able to successfully code this...
vb Code:
Imports System.Windows.Forms.DataVisualization.Charting Public Class Form2 Public Sub Form2_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim theChart As New Chart Dim lineone As New List(Of Point) Dim linetwo As New List(Of Point) Dim theArea As New ChartArea Dim Series As New Series lineone.Add(New Point(TextBox1.Text, TextBox3.Text)) lineone.Add(New Point(TextBox2.Text, TextBox4.Text)) 'linetwo.Add(New Point(textbox1.text, TextBox5.Text)) 'linetwo.Add(New Point(textbox2.text, TextBox6.Text)) theChart.DataSource = lineone 'I want to add linetwo to this theArea.Name = "chartArea" theChart.ChartAreas.Add(theArea) theChart.Series.Clear() Series.XValueMember = "X" Series.YValueMembers = "Y" Series.ChartArea = "chartArea" theChart.Series.Add(Series) Me.Controls.Add(theChart) theChart.Dock = DockStyle.Fill End Sub End Class
To which I was pretty happy that it worked the first time, the problem I am having now is trying to switch this to a line graph, add the second line/second set of points, and label the lines. I have read a few hundred posts about chart controls and they all seem to be geared around bar graphs with one set of data. I know im only a few lines of code away from getting this to work I just need a little nudge in the right direction




Reply With Quote