TMyPointSeries - Only with vertical lines?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Heinz
Newbie
Newbie
Posts: 18
Joined: Wed Jan 21, 2009 12:00 am

TMyPointSeries - Only with vertical lines?

Post by Heinz » Mon Dec 28, 2009 5:16 pm

Hi,

MyPoint series draws a vertical and horizontal line from the axes to each series point.
Is it possible to draw this series only with the vertical lines shown(= hide the horizontal lines)?

Thanks and best regards

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TMyPointSeries - Only with vertical lines?

Post by Yeray » Tue Dec 29, 2009 3:46 pm

Hi Henz,

No, it's not possible right now. I'll add this to the wish list to be implemented in future releases (TV52014610).
In the meanwhile you could do something as following or modify the method procedure TMyPointSeries.DrawValue(ValueIndex:Integer) if you are a source code customer.

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var points1: TPointSeries;
begin
  Chart1.View3D:=false;

  points1:=Chart1.AddSeries(TPointSeries.Create(self)) as TPointSeries;
  points1.FillSampleValues(10);
  points1.OnGetPointerStyle:=OnGetSeriesPointerStyle;
end;

Function TForm1.OnGetSeriesPointerStyle(Sender:TChartSeries; ValueIndex:Integer):TSeriesPointerStyle;
begin
  if ((Sender.XValue[ValueIndex] >= Chart1.Axes.Bottom.Minimum) and (Sender.XValue[ValueIndex] <= Chart1.Axes.Bottom.Maximum)) then
  begin
    Chart1.Canvas.Pen.Color:=clRed;
    Chart1.Canvas.Line(Sender.CalcXPos(ValueIndex),Sender.CalcYPos(ValueIndex),Sender.CalcXPos(ValueIndex),Chart1.Axes.Bottom.PosAxis);
  end;
  result:=psDiamond;
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply