Is there a way to display in mark tips Series name and X.Y values??????
Thanks
Alex
Mark tips Style
Hi Alex,
Yes, with OnGetMarkText event, from your series, you can customize its mark text as you want:
Yes, with OnGetMarkText event, from your series, you can customize its mark text as you want:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.Marks.Visible := True;
end;
procedure TForm1.Series1GetMarkText(Sender: TChartSeries;
ValueIndex: Integer; var MarkText: String);
begin
MarkText := Sender.Name + ' X: ' + floattostr(Sender.XValues.Items[ValueIndex]) +
' Y: ' + floattostr(Sender.YValues.Items[ValueIndex]);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi IQSoft,
Yes, the MarkTips tool display marks text even if it's customized.
Yes, the MarkTips tool display marks text even if it's customized.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Alex,
It can be customized programmatically using the OnGetText event.
It can be customized programmatically using the OnGetText event.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Alex,
You just need to add a TMarksTipTool to your application and make series marks not visible. The code Yeray posted will modify tool's text as well, for example:
You just need to add a TMarksTipTool to your application and make series marks not visible. The code Yeray posted will modify tool's text as well, for example:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.Marks.Visible := False;
end;
procedure TForm1.Series1GetMarkText(Sender: TChartSeries;
ValueIndex: Integer; var MarkText: String);
begin
MarkText := Sender.Name + ' X: ' + FloatToStr(Sender.XValues.Items[ValueIndex]) +
' Y: ' + FloatToStr(Sender.YValues.Items[ValueIndex]);
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 |