Jump to content
Software FX Community

Bug!


User (Legacy)
 Share

Recommended Posts

If you have a chart on a tabPage which is not visible and you set the chart

values, when the chart is shown (the tabPage is selected) the values are not

shown

Replicate:

1. Create new WinForms app

2. Place a 2 page tabPage control on the form

3. Place the chart on the second page (the one not visible when running app)

4. Place a button on the first page

5. Place the following code in the Button_Click event...

for (int x=0; x<chart1.NValues; x++)

chart1.Value[0,x] = x;

Run the app.... press the button and then select the second tabPage...

FYI: If you select the second tabPage and then go back to the first tabPage,

press the button the values are displayed in the chart!

PS. When is the next fix due... this is a flaw which is causing considerable

problems

Simon

Link to comment
Share on other sites

There are two different thing wrong with this code:

1) You are not calling OpenData and CloseData as specified in the docs.

2) If this chart was never initialized, it has no data, random data

generation will be delayed until first paint for optimization purposes, so

that in real-life situations where you set the data before the chart is

displayed, the data is set only twice. For this reason, asking for NValues

before the chart is either display or initialized with data will return ZERO

(0).

--

FP

Software FX, Inc.

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