Software FX Community

# Is it possible to have two series with a different number of points.

## Recommended Posts

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;

Thanks

Simon

##### Share on other sites

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.

##### Share on other sites

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;
##### Share on other sites

Ok, thats works too.

So, if you have any other questions, we are more than glad to help.

## 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.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×