Page 1 of 1
marks - annoying bad behaviour
Posted: Fri Nov 16, 2007 12:02 pm
by 9337510
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
Posted: Fri Nov 16, 2007 12:19 pm
by narcis
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:
Also can the new tee chart read old tee files OK?
Yes, backwards compatibility is something we specially care about when implementing new features.
Posted: Fri Nov 16, 2007 12:26 pm
by 9337510
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.
Posted: Fri Nov 16, 2007 12:42 pm
by narcis
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.
Posted: Fri Nov 16, 2007 12:49 pm
by 9337510
Thanks I will try it
Richard