The
Zedgraph
library given in this
CodeProject
article
A flexible charting library for .NET[
^] By
JChampion is a very good charting library which has options to draw graphs.
A
Test graph
is explained in the article.
A
VB Sample project
is also included in the article.
Download this sample project and
to test with arrays
replace the
CreateGraph
method in this project with the following code.
Private Sub CreateGraph(ByVal zgc As ZedGraphControl)
Dim myPane As GraphPane = zgc.GraphPane
myPane.Title.Text = "My Test Date Graph"
myPane.XAxis.Title.Text = "X Value"
myPane.YAxis.Title.Text = "My Y Axis"
Dim x As Double() = New Double() {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
Dim y As Double() = New Double() {10, 20, 30, 50, 30, 20, 100, 60, 40, 20}
Dim myCurve As LineItem = myPane.AddCurve("My Curve", x, y, Color.Blue, SymbolType.Circle)
myCurve.Symbol.Fill = New Fill(Color.White)
myPane.Chart.Fill = New Fill(Color.White, Color.LightGoldenrodYellow, 45.0F)
myPane.Fill = New Fill(Color.White, Color.FromArgb(220, 220, 255), 45.0F)
zgc.AxisChange()
End Sub
and run the application to test the graph drawn with arrays.