Jump to content
Software FX Community

Discontinous lines when null values in ADO Recordset


User (Legacy)
 Share

Recommended Posts

Hi!

I'm using VC++.

I have a line graph with 3 series (lines) based on an ADO Recordset. The

lines are perfectly drawn except from when the recordset contains rows with

null values. In this case the lines are drawn discontinous, which is not

adequate.

Because the chart has 3 series based on a multiple column recordset,

filtering the recordset is not an idea.

Any solutions to this problem?

Thanks,

Mikal

Link to comment
Share on other sites

Null values translate to hiding points leaving gaps in the lines. This is by 

design.

If you want to create an X/Y chart what you need to do is provide the

appropriate recordset.

For example if you have the following data:

Date Product A Product B

1/1/2004 10 100

1/2/2004 20 90

1/3/2004 30 <null>

1/4/2004 40 70

1/5/2004 <null> 60

1/6/2004 60 50

1/7/2004 70 <null>

1/8/2004 80 30

1/9/2004 <null> 20

1/10/2004 100 10

You need to transform it into:

Date Product A Date Product B

1/1/2004 10 1/1/2004 100

1/2/2004 20 1/2/2004 90

1/3/2004 30 1/4/2004 70

1/4/2004 40 1/5/2004 60

1/6/2004 60 1/6/2004 50

1/7/2004 70 1/8/2004 30

1/8/2004 80 1/9/2004 20

1/10/2004 100 1/10/2004 10

Note 1: Only certain chart types support X-Values, these are: Lines, Step,

Area, Curve, CurveArea, Scatter, Surface and Contour.

Note 2: If there was more <null> values in one product than in the other

simply complete the smaller column with <null> values at the end.

--

FP

Software FX

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

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

 Share

×
×
  • Create New...