Jump to content
Software FX Community

Unable to retrieve X-Axis values. ?????

User (Legacy)

Recommended Posts


(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->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) + ", " +



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!)



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...