This is a migrated thread and some comments may be shown as answers.

Chart - Simple Line X and Y

1 Answer 57 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Thomas Kroll
Top achievements
Rank 1
Thomas Kroll asked on 21 Oct 2010, 10:36 PM
I've been through all the samples and read through most of the forums.  I am hoping someone has an easy direction for me to do the following:

I have a simple list of doubles.  I have actually 2 simple lists of doubles.  They both range from negative to positive.

How to I take the first list and make it my X coordinate and take the second and make it my Y coordinate?

Seems simple, yes.  HOW do I do this programatically!?

example list 1: -2, -1, 0, 1, 2
example list 2: 2, 1, 0, -1, -2

x,y pairs: (-2,2), (-1,1), (0,0), (1,-1) (2,-2)

now graph those 5 x,y pairs.

Thanks in advance for your immediate replies!

Ps, my list is vastly larger and decimals into the thousands.

1 Answer, 1 is accepted

Sort by
0
Thomas Kroll
Top achievements
Rank 1
answered on 22 Oct 2010, 02:56 PM
Dim dataPoint As New DataPoint()
dataPoint.XValue = x
dataPoint.YValue = y

Hunt around long enough and you'll find anything I guess.
Tags
Chart
Asked by
Thomas Kroll
Top achievements
Rank 1
Answers by
Thomas Kroll
Top achievements
Rank 1
Share this question
or