Page 1 of 1

TLineSeries and points

Posted: Tue May 11, 2004 2:08 am
by 8575642
Hello,

Is there any way to turn on points for just a few values, rather than the whole series? I want a certain section of my chart to stand out. Or how about changing the line type for a particular section of points?

Cheers

Andrew

Posted: Tue May 11, 2004 12:15 pm
by Marjan
Hi, Andrew.

Perhaps you could use line series OnGetPointerStyle event for filtering. The following code works fine:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
  line1.FillSampleValues(20);
  line1.Pointer.Visible := True;
end;

function TForm1.line1GetPointerStyle(Sender: TChartSeries;
  ValueIndex: Integer): TSeriesPointerStyle;
begin
  // show 2nd and 13th point pointer only
  if (ValueIndex = 1) or (ValueIndex = 12) then Result := psCircle
  else Result := psSmallDot;
end;