marks - annoying bad behaviour

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:

marks - annoying bad behaviour

Post by Richard Seaby » Fri Nov 16, 2007 12:02 pm

Hi

Sometimes I have a lot of points on a graph and my users want to reduce the number of marks showing - I get them to look at series|Data Source, where they can blank out the text for each point individually - If they use a blank then the point shows the value so I have to get them to put in a space - This is a little ugly and not quite what I expected - I thought if I said for the series to use the label style it would do that.

Also can the new tee chart read old tee files OK?

Thanks

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 Nov 16, 2007 12:19 pm

Hi Richard,
Sometimes I have a lot of points on a graph and my users want to reduce the number of marks showing - I get them to look at series|Data Source, where they can blank out the text for each point individually - If they use a blank then the point shows the value so I have to get them to put in a space - This is a little ugly and not quite what I expected - I thought if I said for the series to use the label style it would do that.
You could try using DrawEvery property, for example:

Code: Select all

  Series1.Marks.DrawEvery:=5;
Also can the new tee chart read old tee files OK?
Yes, backwards compatibility is something we specially care about when implementing new features.
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 Nov 16, 2007 12:26 pm

Drawing every 5 does not help - I am happy with them editing out the ones they dont want - it is just the value shoing if the lable is blank that is the problem.

Often I have many points on a scatter plot - I have no knowledge the points will of where they will be at any time. It is quite reasonable to expect the user to intervene - it is having to use a space not a blank that seems to confuse them.

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 Nov 16, 2007 12:42 pm

Hi Richard,

In that case you can combine this with the OnGetMarkText event like this:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
  Series1.Add(random,'point 1');
  Series1.Add(random,'');
  Series1.Add(random,'point 3');
  Series1.Add(random,'');
  Series1.Add(random,'point 5');

  Series1.Marks.Style:=smsLabel;
end;

procedure TForm1.Series1GetMarkText(Sender: TChartSeries;
  ValueIndex: Integer; var MarkText: String);
begin
  if Sender.Labels[ValueIndex]='' then
    MarkText:='';
//  MarkText:=Sender.Labels[ValueIndex];
end;
You can also comment in OnGetMarkText code an comment out the commented line.
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 Nov 16, 2007 12:49 pm

Thanks I will try it

Richard

Post Reply