How to avoid overlapping when checking Series-Point-Visible

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
wwp3321
Newbie
Newbie
Posts: 60
Joined: Wed Jul 02, 2003 4:00 am

How to avoid overlapping when checking Series-Point-Visible

Post by wwp3321 » Fri Mar 12, 2010 4:52 am

How to avoid overlapping when checking "Series-Point-Visible"?
"Marks" can be drawed every several points by setting the "Series--Marks--Draw every:".
Does "Point" have the any similar setting?

Thanks.

wwp3321
Newbie
Newbie
Posts: 60
Joined: Wed Jul 02, 2003 4:00 am

Re: How to avoid overlapping when checking Series-Point-Visible

Post by wwp3321 » Fri Mar 12, 2010 4:57 am

For Example:
1.I add 300 points to Series1.
2.Then I Check the "Series--Point---Visible".
There are so many points that points overlap each other.
So I want to show "Point" every several points to avoid overlapping.

Thanks.

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

Re: How to avoid overlapping when checking Series-Point-Visible

Post by Yeray » Fri Mar 12, 2010 5:05 pm

Hi wwp3321,

If I understand well, you have a TLineSeries with pointer visible but too much values to show all that pointers so you would like to hide some of them. Here is how you could do it:

Code: Select all

//...
  private
    { Private declarations }
    function Series1GetPointerStyle(Sender: TChartSeries; ValueIndex: Integer): TSeriesPointerStyle;

//...

uses series;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=false;
  Chart1.Legend.Visible:=false;

  with Chart1.AddSeries(TLineSeries.Create(self)) as TLineSeries do
  begin
    FillSampleValues(300);
    Pointer.Visible:=true;
    OnGetPointerStyle:=Series1GetPointerStyle;
  end;
end;

function TForm1.Series1GetPointerStyle(Sender: TChartSeries; ValueIndex: Integer): TSeriesPointerStyle;
begin
  if (ValueIndex mod 5 = 0) then Result:=psRectangle
  else Result:=psNothing;
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

wwp3321
Newbie
Newbie
Posts: 60
Joined: Wed Jul 02, 2003 4:00 am

Re: How to avoid overlapping when checking Series-Point-Visible

Post by wwp3321 » Mon Mar 15, 2010 8:20 am

Thank you very much!

Post Reply