Setting individual pointers

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
CAC
Newbie
Newbie
Posts: 44
Joined: Tue Jun 20, 2006 12:00 am
Location: Plain City, Ohio
Contact:

Setting individual pointers

Post by CAC » Thu Nov 30, 2006 4:52 am

Is it possible to change the style of a pointer within a series based on a value? For example, can I change the pointer from a psCircle to a psDiagCross and then back as I evaluate data from a query and supply it to the chart? I would like to make a line chart that would have pointers with a value of less than 22 to be circles and those greater than 22 to be diagonal crosses.

I've tried an if statement, but I must have something wrong.

Thanks

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Thu Nov 30, 2006 6:53 am

Hi.

You could use point series OnGetPointerStyle event to change individual point pointer style. Something like this:

Code: Select all

function TForm1.Series1GetPointerStyle(Sender: TChartSeries;
  ValueIndex: Integer): TSeriesPointerStyle;
begin
  if Sender.MandatoryValueList[ValueIndex]>22 then result := psDiagCross
  else result := psCircle;
end;
Marjan Slatinek,
http://www.steema.com

Post Reply