Hello,
The easiest way would be using the OnGetPointerStyle event.
You could have an array of TSeriesPointerStyle with the same size of your series values arrays. Ie:
Code: Select all
var mySeriePStyles: Array of TSeriesPointerStyle;
//...
procedure TForm1.FormCreate(Sender: TObject);
begin
//... somewhere after populating the series
setLength(mySeriePStyles, mySerie.Count);
for i:=0 to mySerie.Count-1 do
mySeriePStyles[i]:=TSeriesPointerStyle(Round(random*16));
//...
end;
Then, you could OnGetPointerStyle event to use that array:
Code: Select all
function TForm1.mySerieGetPointerStyle(Sender:TChartSeries;
ValueIndex:Integer): TSeriesPointerStyle;
begin
result:=mySeriePStyles[ValueIndex];
end;
Don't forget to declare the signature of the event and assign it to the series:
Code: Select all
private
{ Private declarations }
function mySerieGetPointerStyle(Sender:TChartSeries;
ValueIndex:Integer): TSeriesPointerStyle;
//...
procedure TForm1.FormCreate(Sender: TObject);
begin
//...
mySerie.OnGetPointerStyle:=mySerieGetPointerStyle;
//...
end;