Chart - Simple Line X and Y

2 posts, 0 answers
  1. Thomas Kroll
    Thomas Kroll avatar
    9 posts
    Member since:
    Jan 2009

    Posted 21 Oct 2010 Link to this post

    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.
  2. Thomas Kroll
    Thomas Kroll avatar
    9 posts
    Member since:
    Jan 2009

    Posted 22 Oct 2010 Link to this post

    Dim dataPoint As New DataPoint()
    dataPoint.XValue = x
    dataPoint.YValue = y

    Hunt around long enough and you'll find anything I guess.
Back to Top