Hi all,
What do I do wrong ???
I have an energy spectrum displayed in a TChart. On the Y-axis the counts are displayed. On the X-axis the Energy (KeV's) are displayed. So far so good. Now I use a fastcall::EnergyChartMouseMove() to locate where the mouse pointer is displayed in the Chart with the following command:
Energy->Caption = EnergySerie1->GetHorizAxis->CalcXPosValue(nX);
The minimum Xposition on the lefthand side of the chart is:99 and the energy is:33 KeV.
The maximum Xposition on the righthand side of the chart is:1166 and the energy is 246 Kev.
So there are 0,199 Kev's per pixel. If I move my mouse in the Chart to the Xlocation where the peak has it's maximum counts (140 KeV) the mouse pointer displays 636 pixels, that equals 636*0,199 = 127 KeV and not 140 KeV
Allthow it looklies that the axis is not linear, the axis properties logarithmic in TChart is set to FALSE.
Any idea what is going wrong???
Thanks in advance!
Johan
What do I do wrong ???
I have an energy spectrum displayed in a TChart. On the Y-axis the counts are displayed. On the X-axis the Energy (KeV's) are displayed. So far so good. Now I use a fastcall::EnergyChartMouseMove() to locate where the mouse pointer is displayed in the Chart with the following command:
Energy->Caption = EnergySerie1->GetHorizAxis->CalcXPosValue(nX);
The minimum Xposition on the lefthand side of the chart is:99 and the energy is:33 KeV.
The maximum Xposition on the righthand side of the chart is:1166 and the energy is 246 Kev.
So there are 0,199 Kev's per pixel. If I move my mouse in the Chart to the Xlocation where the peak has it's maximum counts (140 KeV) the mouse pointer displays 636 pixels, that equals 636*0,199 = 127 KeV and not 140 KeV
Allthow it looklies that the axis is not linear, the axis properties logarithmic in TChart is set to FALSE.
Any idea what is going wrong???
Thanks in advance!
Johan