Hi,
I want to have different mark text displayed when the mark is initiated by the TMarkTipTool, or when it is initiated as the chart is drawn by the normal TChartSeries.OnGetMarkText.
I can't figure out how to do this because it seems that the TMarkToolTip is getting the mark text by calling TChartSeries.OnGetMarkText. I think I need something passed to TChartSeries.OnGetMarkText that tells me who is requesting the mark text.
Regards,
Bill
TChartSeries.OnGetMarkText and TMarksTipTool.OnGetText
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Bill,
You can use both events as shown here:
You can use both events as shown here:
Code: Select all
var
Form1: TForm1;
Series: TChartSeries;
Index: Integer;
implementation
{$R *.dfm}
procedure TForm1.Series1GetMarkText(Sender: TChartSeries;
ValueIndex: Integer; var MarkText: String);
begin
MarkText := 'Point ' + IntToStr(ValueIndex+1);
Series:=Sender;
Index:=ValueIndex;
end;
procedure TForm1.ChartTool1GetText(Sender: TMarksTipTool;
var Text: String);
begin
Text := FloatToStr(Series.YValue[Index]);
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |