SimonB Posted November 23, 2009 Report Share Posted November 23, 2009 Is it possible to have two series with a different number of points. My two series have the same X,Y axis but they have not the same number of points. The two axis are Double. My series are defined as line so, do I need to add "average dummy points" to have 2 points for each X value? Example : Serie 1 (3 points) : (0,0), (1,1), (2,2) Serie 2 (4 points) : (0,0), (1,2), (1,3), (3,3) Here is what I'm used to do : allArrays[0] = serie1; allArrays[1] = serie2; allArrays[2] = XArray; base.DataSourceSettings.Fields.Add(new FieldMap("Field1", FieldUsage.Value)); base.DataSourceSettings.Fields.Add(new FieldMap("Field2", FieldUsage.Value)); base.DataSourceSettings.Fields.Add(new FieldMap("Field3", FieldUsage.XValue)); Thanks Simon Quote Link to comment Share on other sites More sharing options...
juanZ Posted November 23, 2009 Report Share Posted November 23, 2009 Hi Simon, you can try something like this chart1.Gallery = Gallery.Lines; int[] series1 = { 12, 15, 10 }; int[] series2 = { 20, 25, 7, 12, 5, 15, 3 }; string[] labels = { "1", "2", "3","4","5", "6","7"}; object[] allArrays = new object[3]; //Load Array of Arrays allArrays[0] = series1; allArrays[1] = series2; allArrays[2] = labels; ListProvider lstProvider = new ListProvider(allArrays); chart1.DataSourceSettings.DataSource = lstProvider; Let me know if this helped. Quote Link to comment Share on other sites More sharing options...
SimonB Posted November 23, 2009 Author Report Share Posted November 23, 2009 Thanks JuanZ. Humm no, because I really need to have my values in double instead of in string but I found another to fix my issue. I used to different XArray allArrays[0] = Serie1 allArrays[1] = XArray1;allArrays[2] = Serie2 allArrays[3] = XArray2; Quote Link to comment Share on other sites More sharing options...
juanZ Posted November 23, 2009 Report Share Posted November 23, 2009 Ok, thats works too. So, if you have any other questions, we are more than glad to help. 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.