Deleting individual marks

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Richard Seaby
Newbie
Newbie
Posts: 58
Joined: Mon May 17, 2004 4:00 am
Contact:

Deleting individual marks

Post by Richard Seaby » Thu Sep 20, 2007 3:54 pm

How do i delete individual marks - I have a complex graph that a user needs to be able delete some of the marks as too many overlap - I am using pointseries and 3dpointseries. Any ideas? - my first try was to going into edit-data and replace the label with a space - unfortunately this causes other parts of the plot go wrong.

Thanks

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 20, 2007 4:19 pm

Hi Richard,

Instead of replacing the label with a space you could try replacing it with an empty string, for example:

Code: Select all

MyEmptyString:='';
Another option would be using OnGetMarkText event as shown below. The example code only displays one in every tenth marks setting the others to an empty string.

Code: Select all

procedure TForm1.Series1GetMarkText(Sender: TChartSeries;
  ValueIndex: Integer; var MarkText: String);
begin
  if ValueIndex mod 10 <> 0 then MarkText:='';
end;
Hope this helps!
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

Richard Seaby
Newbie
Newbie
Posts: 58
Joined: Mon May 17, 2004 4:00 am
Contact:

Post by Richard Seaby » Fri Sep 21, 2007 7:35 am

I tried the " " option - the problem with that is if you have other series plotted with shorter data series in it the it seems to fill the spaces with the last value and plot loads of extra points.

Plotting every so many does not help either - they have to be selectable by the user and are randomly spaced through the data set.

Ideally I would just click on a mark and push delete - but I cant get that to work at the moment.

Richard

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 21, 2007 7:50 am

Hi Richard,

In that case you'd better use annotation tools and set them to custom positions. You'll find an example here. You could use Series's OnClick event to know on which point you should draw the annotation tool.

Hope this helps!
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