User (Legacy) Posted May 24, 2000 Report Share Posted May 24, 2000 greetings- (I have a ChartFX98 control on my form. I am using BCB 5.0.) I am (still) having a problem recalling the data values for the x-axis. The first code snippet: //{Open the VALUES channel and keep number of series and points} ChartFX1->OpenDataEx(COD_VALUES | COD_SMOOTH ,COD_UNCHANGE, COD_UNCHANGE); ChartFX1->ThisSerie = SeriesNum; ChartFX1->Value[index] = ODValue; ChartFX1->Xvalue[index] = (float)wavelength; //{Close the VALUES channel} ChartFX1->CloseData(COD_VALUES | COD_SMOOTH ); adds new values to my chart. SeriesNum indicates what series to place the values in. ODValue is the Y-axis values, wavelength is the X-Axis values. This works, and displays the chart appropriately. The second code snippet: ICfxSeriesPtr pSeries; float tempfloat,tempfloat2; pSeries=ChartFX1->Series->get_Item(SeriesCount); // series count indicates what series I'm looking at // for (int i=0; i< ChartFX1->NValues; i++) { tempfloat = pSeries->get_Yvalue(i); tempfloat2 = pSeries->get_Xvalue(i); ResultsMemo->Lines->Add("recall btn value(x,y): " + IntToStr(i) + " " + FloatToStrF(tempfloat2,ffFixed,5,3) + ", " + FloatToStrF(tempfloat,ffFixed,5,3)); } this code is supposed to show the x,y value pairs in a memo. I ALWAYS get 0.0 for the tempfloat2 variable. can anyone give me an indication as to what I am doing wrong? ('cause it must be something!) thanks! michael Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.