Page 1 of 1

Changing point sizes

Posted: Tue Jun 10, 2008 9:26 am
by 10047363
I have a chart on which I have plotted say 20 points using a pointseries. Each point is plotted as a circle of a certain size. How can I arrange it that every odd point is largere than the even points? When I change the size of one point in the series is automatically affects all the points.
Mike

Posted: Tue Jun 10, 2008 10:05 am
by yeray
Hi Mike,

You could use OnGetPointerStyle event to change every pointer size. You could do something like following;

Code: Select all

var OddSize, EvenSize: Integer;

//...

function TForm1.Series1GetPointerStyle(Sender: TChartSeries;
  ValueIndex: Integer): TSeriesPointerStyle;
begin
  if ValueIndex mod 2 = 0 then
  begin
    Series1.Pointer.HorizSize := OddSize;
    Series1.Pointer.VertSize := OddSize;
  end
  else
  begin
    Series1.Pointer.HorizSize := EvenSize;
    Series1.Pointer.VertSize := EvenSize;
  end;

  Result := psCircle;
end;

Chaning point size

Posted: Tue Jun 10, 2008 10:15 am
by 10047363
Many thanks. I will give it a try
Mike