Al Hapeman Posted September 10, 2008 Report Share Posted September 10, 2008 I want a X/y chart of mutiple models of our product. each model has points (x and y) the x's and y's for each model have different ranges. I cannot for the life of me find a simple example where I can load this data point by point for each series (model). I can see where a can change all kinds of attributes. but input the data point by point series by series no such luck. Does anyone have such a simple example. Thanks in advance. Al Quote Link to comment Share on other sites More sharing options...
Frank Posted September 10, 2008 Report Share Posted September 10, 2008 Did you check the "Passing Data" sample application included with the product? Ut can be accessed from the Resource Center. I extracted the relevant code from this sample: /* This function populates the chart using the API. First, you must specify the number of series and points * and then pass the data. In this case we're passing random data. You can also use this method to pass X values, * for which you will use chart1.Data.X[series, point] and chart1.Data.Y[series, point], instead of * chart1.Data[series, point], which is simply to pass Y data. */chart1.Data.Series = 2; chart1.Data.Points = 15; for (int series = 0; series < chart1.Data.Series; series++) for (int point = 0; point < chart1.Data.Points; point++) chart1.Data[series, point] = r.NextDouble() * 100; You can set X values in a similar way by doing: chart1.Data.X[series, point] = r.NextDouble() * 100; Quote Link to comment Share on other sites More sharing options...
Al Hapeman Posted September 10, 2008 Author Report Share Posted September 10, 2008 Thanks I just descovered it. For some reason the examples were not working, so after writing this and calming down a bit I realized I could at least see the code and I had found it. Many Thanks Al Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.