User (Legacy) Posted February 4, 2003 Report Posted February 4, 2003 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
Software FX Posted February 4, 2003 Report Posted February 4, 2003 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.
User (Legacy) Posted February 4, 2003 Author Report Posted February 4, 2003 Great! Thanks for getting back so soon, clear case of RTFM!! Keep up the good work! :-)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.