Page 1 of 1

DrawAllPoints

Posted: Thu Sep 28, 2006 8:37 am
by 9340353
Hi,

the DrawAllPoints property leads to a slow reaction if true and a high number of points. But if DrawAllPoints is switched off the resulting curve quite often looks weird.

So I propose to modify the DrawValues procedure in Series.pas:

1) add 4 new variables in the TFastLineSeries class definition in section {internal}:
minpoint : Integer; // new variable
maxpoint : Integer; // new variable
minpointdefined : Boolean; // new variable
maxpointdefined : Boolean; // new variable

2) modify the DrawValues procedure:
procedure TFastLineSeries.DrawValue(ValueIndex:Integer);
var X : Integer;
Y : Integer;
begin
CalcPosition(ValueIndex,X,Y);

if X=OldX then
begin
if (Y=OldY) then exit;
if (not DrawAllPoints) then
begin
if minpointdefined and maxpointdefined then
begin
if (Y > minpoint) and (Y < maxpoint) then exit
else
if Y > maxpoint then maxpoint := Y;
if Y < minpoint then minpoint := Y;
end
else
if minpointdefined and not maxpointdefined then
begin
if Y > minpoint then maxpoint := Y; maxpointdefined := true;
if Y < minpoint then
begin
maxpoint := minpoint; minpoint := Y; maxpointdefined := true;
end;
end
else
begin
minpoint := Y;
minpointdefined := true;
end;
end;
end
else
begin
minpointdefined := false;
maxpointdefined := false;
end;

if IgnoreNulls or (ValueColor[ValueIndex]<>clNone) then
begin
With ParentChart.Canvas do
if ParentChart.View3D then
begin
if Stairs then
if InvertedStairs then LineTo3D(OldX,Y,MiddleZ)
else LineTo3D(X,OldY,MiddleZ);
LineTo3D(X,Y,MiddleZ);
end
else
begin
if Stairs then
if InvertedStairs then LineTo(OldX,Y)
else LineTo(X,OldY);
LineTo(X,Y);
end;
end
else DoMove(X,Y);

OldX:=X;
OldY:=Y;
end;


With this modification it is checked if a new point to be drawn is at an existing x position. If yes then it is checked if it is between minpoint and maxpoint or outside. If it is inside then the new point is not drawn. If it is outside then it is drawn and minpoint/maxpoint are adjusted accordingly.

By this modification the drawed curve is always looking perfect like with all points drawn. The disadvantage is that e.g. a curve with a continous rising/falling slope is is not drawn quicker. But more random curves are drawn very quick under statistical aspects.


Now the reason for my post:
I would like to have this code in V7.08 which is binary only. In V7.07 source code it is possible but V7.07 is different to V7.08, so I get error messages about different compilations together with other used software libraries.

Uli

Posted: Thu Sep 28, 2006 8:51 am
by narcis
Hi Uli,

Thanks for your suggestion. I'll add it to our wish-list to be reviewed and considered for inclusion in future releases.
Now the reason for my post:
I would like to have this code in V7.08 which is binary only. In V7.07 source code it is possible but V7.07 is different to V7.08, so I get error messages about different compilations together with other used software libraries.
It's not most likely to happen since we are currently working on TeeChart v8 VCL and it's most un-likely that a new v7 VCL maintenance will be released. However, we released v7.08 version for Delphi 2006 only to fix an issue existing with the help file system in D2006.

Anyway, which errors do you get?

Posted: Sun Oct 08, 2006 8:33 pm
by 9340353
Hi Narcís,

I would like if you can confirm if my proposal is welcome and included in future releases as I do not have to implement it everytime by myself :)

Now in the meantime I have got the V7.07 source code working. The problem was that the installer of the V7.08 binary code does the installation quite well. But it does not uninstall the TEEINCPATH and TEELIBPATH environment variables. Thus after installing the V7.07 package I got further compilation errors as the environment variables simply kept pointing to the wrong library.

You should change it :)

Uli

Posted: Mon Oct 09, 2006 9:18 am
by narcis
Hi Uli,
I would like if you can confirm if my proposal is welcome and included in future releases as I do not have to implement it everytime by myself
All suggestions are welcomed and for sure it will be considered for inclusion but I can't still confirm what will be included and what won't since we have a very long list of requests. You should be aware at new versions release notes.
Now in the meantime I have got the V7.07 source code working. The problem was that the installer of the V7.08 binary code does the installation quite well. But it does not uninstall the TEEINCPATH and TEELIBPATH environment variables. Thus after installing the V7.07 package I got further compilation errors as the environment variables simply kept pointing to the wrong library.
I think this has already been improved for v8's installer.

Posted: Mon Oct 09, 2006 11:12 am
by 9340353
Do I have a chance to become a V8 beta tester?

Uli

Posted: Mon Oct 09, 2006 11:45 am
by narcis
Hi Uli,

Yes, I sent you the information to beta-test v8 at your forums contact e-mail address.

Posted: Wed Oct 11, 2006 3:23 pm
by 9340353
Hello Narcís,

thanks for your answer but up to now I have not got any information.
Can you please check?

Uli

Posted: Fri Oct 13, 2006 10:29 am
by narcis
Hi Uli,

Yes, I checked it and it was sent. I resent the e-mail again to your forums contact e-mail address. It could be that the message got trapped by anti-spam filter? If you want you can let us know an alternative e-mail address where to send the info?

Posted: Fri Oct 27, 2006 8:32 am
by 9340353
Dear Narcís,

it seems that there is a problem.
Can you please use uli.brueggemann@gmail.com ?

Thanks

Uli

Posted: Fri Oct 27, 2006 8:35 am
by narcis
Dear Uli,

Yes, I've just sent it there.

Posted: Fri Oct 27, 2006 8:47 am
by 9340353
Narcís,

many thanks.
A question about installation. I use V7 now. Can I install V8beta in parallel in Delphi 2006 or is there a conflict?


Uli

Posted: Fri Oct 27, 2006 9:09 am
by narcis
Hi Uli,

Unfortunately you can only install one TeeChart version in each IDE.