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

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.

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.


  • Create New...