Page 1 of 1

Deleting individual marks

Posted: Thu Sep 20, 2007 3:54 pm
by 9337510
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

Posted: Thu Sep 20, 2007 4:19 pm
by narcis
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!

Posted: Fri Sep 21, 2007 7:35 am
by 9337510
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

Posted: Fri Sep 21, 2007 7:50 am
by narcis
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!