Jadeja RJ
Jadeja RJ

Reputation: 1014

Creating graphs in VB

I have three listviews in VB.net and i want to get common values from that and make an custom chart from it For Example, Eg.

Listview1  Listview2  Listview3
A          B          H
B          C          B
C          A          D
D          E          E
E          J          F

Common in Listview

1 And 2    2 And 3   1 And 3
A          B         B
B          E         D
C                    E
E

Then Create Graph shown like this Diagram

I know how to get common values but don't know how to draw graph like this

Any ideas or Suggestions . . . . .?? It's VB Forms Application

Upvotes: 1

Views: 8736

Answers (2)

BRSinh
BRSinh

Reputation: 268

Try Using Graph# You'll find enough documentation And tutorials there

Upvotes: 2

Monika
Monika

Reputation: 2210

There is a chart tool where you can add your values and plot in various styles

Here's a simple example of creating a line graph with a single series containing 3 data points.

Drag a chart to your form and add this code

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
     Chart1.Series.Clear()
     Chart1.Titles.Add("Demo")
     'Create a new series and add data points to it.
     Dim s As New Series
     s.Name = "aline"
     'Change to a line graph.
     s.ChartType = SeriesChartType.Line
     s.Points.AddXY("1990", 27)
     s.Points.AddXY("1991", 15)
     s.Points.AddXY("1992", 17)
     'Add the series to the Chart1 control.
     Chart1.Series.Add(s)
 End Sub

You will need to add

Imports System.Windows.Forms.DataVisualization.Charting

Of course you would have to iterate through your data and add points based on your information.

Upvotes: 1

Related Questions