I have been stuck trying everything I can think of and I can not get this to work. I am trying to create a list from a 2D array. The reason behind this is so that I can create a XY graph and use the grid lines to indicate where a select item is within my graph. I have attached a hand drawing o my idea if that helps anyone as well. In simple every time within my 2D array a file comes across that reads testtesttest.D000 I need that to be stored into a separate list so I can use that for my x axis. I am using List(Of String) in order to create what I currently have. Everything I have tried I cannot seem to get those select files by their self in a new list. The code below currently reads all files and puts them in to the correct place. would it be more simple to also use the .AxisX. Command to get this to work?
'2D ARRAY
reader = New streamReader("R:PathTooriginalFile.csv")
Dim stAll as String = reader.ReadToEnd
reader.Close()
MonitorIDTextFile = New StreamWrite("R:PathToWhereICoppiedTheFile", False)
MonitorIDTextFiles.WriteLine(stALL) MonitorIDTextFile.close()
'X-Axis Define
**strong text**Dim LinesForDateOfTheFile =
File.ReadAllLines("R:PathToWhereICoppiedTheFile") For x_DOF = 1 to
LineCount
Dim data = LinesForDateOfTheFile(x_DOF)
Dim splits = data.Split(","c)
For y_DOF = 0 To myarray.GetUpperBound(1)
myarray(x_DOF, y_DOF) = splits(y_DOF)
DateOfFile = myarray(x_DOF, 3)
Next
DateOfTheFileValues.Add(DateOfFile)
Next
CountsOfTheDateOfFile = DateOfTheFileValues.Count -1
'Y-AXIS Define
Dim LinesForCR1 =
File.ReadAllLines("R:PathToWhereICoppiedTheFile") For x_CR1 = 1 to
LineCount
Dim data = LinesForCR1(x_CR1)
Dim splits = data.Split(","c)
Dim StringConversion As Single
For y_CR1 = 0 To myarray.GetUpperBound(1)
myarray(x_CR1, y_CR1) = splits(y_CR1)
GrossCR1 = myarray(x_CR1, 44)
Next
StringConversion = CSng(GrossCR1)
GrossCR1 = StringConversion
GrossCR1Values.Add(GrossCR1) Next CountsOfCR1 = GRossCR1Values.Count -1
'Plot Graph
ChartName.Titles.Add("Name Of
Chart") ChartName.ChartAreas.Clear()
ChartName.ChartAreas.Add("Default") With
ChartName.ChartAreas("Dedault")
Dim i As Integer
For i = 0 to CountsOfDateOfFile
Next
.AxisX.Title = "Date"
.AxisY.Title = "Counts"
.Axisx.MajorGrid.LineColor = Color.Red
.Axisx.Maximum = CountsOfDateOfFile
.AxisY.MajorGrid.LineColor = Color.Orange
ChartName.ChartAreas(0).AxisY.IsLogarithmic = True
ChartName.Series.Clear() End With
ChartName.Add("CR1")
ChartName.Series("CR1").Color = Color.DarkTurquoise
ChartName.Series("CR1").BorderDashStyle =
DataVisualization.Charting.ChartDashStyle.Dot
ChartName.Series("CR1").BorderWidth = 4
ChartName.Series("CR1").ChartType =
DataVisualization.Charting.SeriesChartType.Point
For i1 As Integer = 0 To CountsOfCR1
Dim y1 As Single
Dim x1 AS Single
x1 = DateOfFileValues(i1)
y1 = GrossCR1Values(i1)
If y1 = 0 Then y1 = 1
ChartName.Series("CR1").Points.AddXY(x1, y1)
Next