Jump to content
Software FX Community

X-Y Line Chart Question: Multiple Series w/ Different # of points

User (Legacy)

Recommended Posts


I got a problem when I tried to plot a multi-series X-Y line chart,


series have different number of points.

e.g I want to plot two series:

Series 1 w/ 2 points (1,1) and (2,2)

Series 2 w/ 3 points (1,2), (2,4) and (3,6)

I used the code below to plot them:

Chart.OpenData(COD.Values, 2, 3);

Chart.OpenData(COD.XValues, 2, 3);

Chart.Value[0,0] = 1;

Chart.XValue[0,0] = 1;

Chart.Value[0,1] = 2;

Chart.XValue[0,1] = 2;

Chart.Value[0,0] = 1;

Chart.XValue[0,0] = 2;

Chart.Value[0,1] = 2;

Chart.XValue[0,1] = 4;

Chart.Value[0,2] = 3;

Chart.XValue[0,2] = 6;



In this way, an extra point (0,0) will be plotted on series 1. coz when I

open data, I set the

number of point to 3. While the series 1 only has 2 points.

Could you give me a clue how to resolve this?



Link to comment
Share on other sites

All series have the same number of points. You may hide some points by

assigning Chart.Hidden to their value. You can also do:

Chart.OpenData(COD.Values | COD.AllocHidden, 2, 3);

To initialize all points to Hidden instead of Zero, this way, if you don't

assign a point, it will remain hidden.



Software FX, Inc.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...