User (Legacy) Posted September 7, 2004 Report Share Posted September 7, 2004 Hi, I am using ChartFX on ASP and SQL server to plot a graph with Gallery=SCATTER. I would like to plot 3 series like: ChartFX.OpenDataEx COD_VALUES,3,COD_UNKNOWN ChartFX.OpenDataEx COD_XVALUES,3,COD_UNKNOWN While not RS1.EOF '1st series ChartFX.ValueEx(0,j) = RS1("something") ChartFX.XValueEx(0,j) = RS1("something") ChartFX.Series(0).MarkerShape = MK_DIAMOND '2nd series ChartFX.Series(1).Yvalue(j) = rs2("something") ChartFX.Series(1).Xvalue(j) = rs2("something") ChartFX.Series(1).MarkerShape = MK_TRIANGLE ChartFX.Series(1).MarkerSize = 5 j=j+1 rs1.MoveNext Wend '3rd series Do Until rs3.EOF ChartFX.Series(2).Yvalue(st) = rs3("something") ChartFX.Series(2).Xvalue(st) = rs3("something") ChartFX.Series(2).MarkerShape = MK_RECT ChartFX.Series(2).MarkerSize = 2 st = st + 1 rs3.MoveNext Loop ChartFX.CloseData COD_XVALUES ChartFX.CloseData COD_VALUES This code produces an additional marker (caused by the 3rd series) at (0,0) when there is no such value. How can I prevent this? Pl. let me know if you need any other parts of the code to understand the problem better. Thanks! AA Link to comment Share on other sites More sharing options...
Software FX Posted September 8, 2004 Report Share Posted September 8, 2004 The problem seems to be that the third series is "shorter" than the others. In Chart FX 5 ALL series have the same number of points, so the rest of the points are being filled with zero (0). What you need to do is hide them by filling them with CHART_HIDDEN as the Y-Value (X-Value can remain at zero). So after your last loop, you need to do this: .... st = st + 1 rs3.MoveNext Loop While (st < j) ChartFX.ValueEx(2,st) = CHART_HIDDEN st = st + 1 Wend While (j < st) ChartFX.ValueEx(0,j) = CHART_HIDDEN ChartFX.ValueEx(1,j) = CHART_HIDDEN j = j + 1 Wend -- FP Software FX Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.