Marks just for individual points along a series
Posted: Fri Dec 02, 2011 8:26 am
Hello,
I tried to use the marks-feature to label just one or a few points of the complete series (TPointSeries or TLineSeries). The other points should be left unlabeled. However, my experiments with the series.marks object did not seem to be very successful. I tried the following code (using TeeChart 2010):
As expected, the point of index 3 was labeled with "Special Point", but all other points were marked as well: their label contains the current y-value of the point, although I set ValueMarkText:='' (empty string). Has anybody any idea how to solve this problem? Im sure, there is a very simple solution for this, but I couldn't find the answer from online help or forum posts.
I tried to use the marks-feature to label just one or a few points of the complete series (TPointSeries or TLineSeries). The other points should be left unlabeled. However, my experiments with the series.marks object did not seem to be very successful. I tried the following code (using TeeChart 2010):
Code: Select all
Series:=TLineSeries(Chart1.SeriesList[0]);
Series.Clear;
Series.Pen.Visible:=true;
Series.Pointer.Visible:=true;
for i := 0 to 10 do
begin
Series.AddXY(i,random(10),'');
if i=3 then
Series.ValueMarkText[i]:='Special Point'
else
Series.ValueMarkText[i]:='';
end;
series.Marks.Visible:=true;
Series.Marks.OnTop:=true;