NullPoint are not well displayed with TFastLineSeries

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
franckgar
Advanced
Posts: 109
Joined: Thu Nov 04, 2004 5:00 am

NullPoint are not well displayed with TFastLineSeries

Post by franckgar » Wed Sep 28, 2005 1:46 pm

Hi,
I try to use null points with TFastLineSerie with IgnoreNull = FALSE. Normally the lines must not be drawn between points who encapsulate the null points .... but it doesn't work well as you can see here :
http://cjoint.com/?jCpUtd8p1x
The green trace is a TFastLineSerie and the red one is a TLineSeries. Has you can see, it only works well with TLineSeries.

Is this bug will be corrected in the next release who will be available soon ?

Thanks
franckgar

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Sep 29, 2005 11:13 am

Hi franckgar,

have you tried using the SetNull method as shown in the "Nulls and Stairs" example at the TeeChart features demo (All Features\Welcome!\Chart Styles\Standard\Fast Line). You'll find the TeeChart features demo at the TeeChart program group.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

franckgar
Advanced
Posts: 109
Joined: Thu Nov 04, 2004 5:00 am

NullPoint are not well displayed with TFastLineSeries

Post by franckgar » Thu Sep 29, 2005 12:15 pm

In my program I'm using the function AddNullXY() to add a null point into my list. I tested with the function SetNull() but the result is the same : the behavior of TFastLineSeries and TLineSeries are not the same with the null points !!

I've just sent you an email with a demo program to show you the problem.

I'm waiting for your answer on the forum.

Regards
Franck

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Sep 30, 2005 9:19 am

Hi Franck,

I didn't receive your project but I've been able to reproduce it and this is certainly a bug which I've added to our defect list to be fixed for future releases. In the meantime, a workaround is adding a Null point where the line should start to be drawn as shown here:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var
  i: Integer;
begin
  for i:=0 to 20 do
  begin
    if ((i=6) or (i=11)) then
    begin
      Series1.AddNull(i);
      if i=6 then Series2.AddNullXY(i+1,-20)
      else Series2.AddNullXY(i+1,-(i+1))
    end
    else
      if i<6 then
      begin
        Series1.Add(10);
        Series2.Add(-10);
      end
      else
        if i<11 then
        begin
          Series1.Add(20);
          Series2.Add(-20);
        end
        else
          begin
            Series1.Add(i);
            Series2.Add(-i);
          end;
  end;

  Series2.IgnoreNulls:=false;
end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

franckgar
Advanced
Posts: 109
Joined: Thu Nov 04, 2004 5:00 am

Post by franckgar » Thu Oct 20, 2005 2:52 pm

Hi Narcis,

I'm disappointed to see that this bug is not corrected into TeeChart v7.05 !!
As my program is designed, I can not use your solution to bypass this bug of the graph .... and I really need a solution.
As I have the source of TeeChart, could you indicate me where is the bug to let me correct it dirrectly ?

Thanks
franckgar

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Oct 21, 2005 7:18 am

Hi Franck,

I'm not sure about that because I haven't looked at it closely but the problem could be at Series.pas on procedure TFastLineSeries.DrawValue(ValueIndex:Integer);, specially at the second if at its else branch and the DoMove call.

Be careful if you modify the DoMove procedure as it is called at another method too.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

franckgar
Advanced
Posts: 109
Joined: Thu Nov 04, 2004 5:00 am

Post by franckgar » Fri Oct 21, 2005 9:24 am

Thanks for you reply.
I've found a better and simple solution to resolve my problem.... I just move the last null point to the position of the next visible point.... so the line is even drawn but it is not visible as the two points are at the same position.

Franck

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Oct 21, 2005 10:03 am

Hi Franck,

I'm glad to hear you found a workaround that works for you.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply