Hello,
I´m working with a Gantt chart using "AddGanttColor" and one series. I need to set a value, and show it like a hint when the user moves the mouse over each Gantt bar point.
How can I do it?
I´m using Delphi 7 and Teechart Standard 4.04 edition
Thanks and best regards
Setting and showing values like a hint in Gantt Chart
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ralph,
First of all, please notice that these newsgroups are addressed to TeeChart Pro and TeeChart v7 Standard registered customers. For questions about TeeChart version shipped with Delphi please post your questions at our public newsgroups at news://www.steema.net.
Regarding your technical question, this is not possible with the TeeChart version you are using. TeeChart Pro v7 VCL (current TeeChart version) includes MarkTips tool which already does what you request.
Here you'll find what's included in v7 Pro and Standard versions.
With v4.04 Standard you can try using something like this:
First of all, please notice that these newsgroups are addressed to TeeChart Pro and TeeChart v7 Standard registered customers. For questions about TeeChart version shipped with Delphi please post your questions at our public newsgroups at news://www.steema.net.
Regarding your technical question, this is not possible with the TeeChart version you are using. TeeChart Pro v7 VCL (current TeeChart version) includes MarkTips tool which already does what you request.
Here you'll find what's included in v7 Pro and Standard versions.
With v4.04 Standard you can try using something like this:
Code: Select all
procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var Index: Integer;
begin
Index:=Series1.Clicked(X,Y);
if (Index<>-1) then
Chart1.Canvas.TextOut(X,Y,Series1.ValueMarkText[Index]);
else
Series1.Repaint;
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 |
Hi Narcís,
Thanks for your kind and quick response. I tried your code and it works fine, but only for showing, not setting (I will have to update my old version).
I´m sorry for this wrong newsgroup post (I have "TeeChart Pro v4 VCL" and "TeeChart Pro v3 ActiveX", but not TeeChart Pro v7).
Best regards (y nuevamente, muchas gracias por tu amabilidad)
Thanks for your kind and quick response. I tried your code and it works fine, but only for showing, not setting (I will have to update my old version).
I´m sorry for this wrong newsgroup post (I have "TeeChart Pro v4 VCL" and "TeeChart Pro v3 ActiveX", but not TeeChart Pro v7).
Best regards (y nuevamente, muchas gracias por tu amabilidad)
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Ralph,
You're very welcome.
Sorry but I misunderstood your original question then. You can also set marks text using the method you mention doing something like this:
You can also customize this text in Series' OnGetMarkText event.
You're very welcome.
Sorry but I misunderstood your original question then. You can also set marks text using the method you mention doing something like this:
Code: Select all
Series1.AddGanttColor(StartValue,EndValue,Y,'MyMarkText',clTeColor);
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 |