How to make some arrows in an arrow series visible?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
pssdelphi
Newbie
Newbie
Posts: 29
Joined: Thu Oct 21, 2004 4:00 am

How to make some arrows in an arrow series visible?

Post by pssdelphi » Mon Jan 01, 2007 4:57 pm

I have an arrow series that I need to change some individual arrows visible property from true to false and vise versa. How would I do this? Im not wanting to just 'hide' an arrow by changing its color to match the background.

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

Post by Narcís » Wed Jan 03, 2007 9:29 am

Hi pssdelphi,

Null points for arrow series are not supported. An option would be using two series to mimic this behavoir, one series for "regular" points and other series for null points. Then use Series.Active property to show/hide "null" arrows series. i.e. : Series2.Active := true;. This is a little bit tricky if you want to swap one point from visible to invisible.

The only other way would be to derive new series type from arrow series and override it's DrawValue method. In it, you should call the inherited DrawValue only if point ValueColor[ValueIndex] is not null:

Code: Select all

   TNullArrowSeries = class (TArrowSeries)
    public
      procedure DrawValue(ValueIndex: Integer); override;
   end;

   { TNullArrowSeries } 
   procedure TNullArrowSeries.DrawValue(ValueIndex: Integer); 
   begin
     if ValueColor[ValueIndex]<>clNone then inherited;
   end;
I'll also add this to our wish-list to be implemented for next releases.
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

pssdelphi
Newbie
Newbie
Posts: 29
Joined: Thu Oct 21, 2004 4:00 am

Post by pssdelphi » Tue Jan 09, 2007 5:42 am

Thanks, good idea, I made it more perminate in the arrowcha.pas source with

procedure TArrowSeries.DrawValue(ValueIndex:Integer);
Var p0 : TPoint;
p1 : TPoint;
tmpColor : TColor;
Begin
tmpColor:=ValueColor[ValueIndex];

if tmpColor = clNone then exit; // added to hide lines

Post Reply