problem with calcXpos (also calcYpos)
Posted: Fri Oct 09, 2015 4:36 am
I need to draw a line using coordinates from a series of x,y points. The plot is fine but my attempt to draw a line fails when I use code like the following:
x1 :=Seriesxy.CalcXPos( ii-1 );
y1 :=Seriesxy.CalcYPos( ii-1 );
x2 :=Seriesxy.CalcXPos( jj-1 );
y2 :=Seriesxy.CalcYPos( jj-1 );
chart.Canvas.Line(x1, y1, x2, y2);
The problem is that the x1,y1, x2,y2 are equal to zero for all values of ii and jj even though the data values in the series are fine. I can look at them in debug mode. I also tried using :
x :=Seriesxy.XValues[ii-1];
x1 := seriesxy.CalcXPosValue( x );
The values of x are correct but x1 is still always equal to 0.
Is there some likely kind of error that I must be making?
Thanks, this is driving me a bit crazy!
x1 :=Seriesxy.CalcXPos( ii-1 );
y1 :=Seriesxy.CalcYPos( ii-1 );
x2 :=Seriesxy.CalcXPos( jj-1 );
y2 :=Seriesxy.CalcYPos( jj-1 );
chart.Canvas.Line(x1, y1, x2, y2);
The problem is that the x1,y1, x2,y2 are equal to zero for all values of ii and jj even though the data values in the series are fine. I can look at them in debug mode. I also tried using :
x :=Seriesxy.XValues[ii-1];
x1 := seriesxy.CalcXPosValue( x );
The values of x are correct but x1 is still always equal to 0.
Is there some likely kind of error that I must be making?
Thanks, this is driving me a bit crazy!