Page 1 of 1

How to make some arrows in an arrow series visible?

Posted: Mon Jan 01, 2007 4:57 pm
by 9339638
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.

Posted: Wed Jan 03, 2007 9:29 am
by narcis
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.

Posted: Tue Jan 09, 2007 5:42 am
by 9339638
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