Setting and showing values like a hint in Gantt Chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Ralph
Newbie
Newbie
Posts: 4
Joined: Tue Jan 16, 2007 12:00 am

Setting and showing values like a hint in Gantt Chart

Post by Ralph » Wed Jan 31, 2007 10:52 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jan 31, 2007 11:42 am

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:

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
Image Image Image Image Image Image
Instructions - How to post in this forum

Ralph
Newbie
Newbie
Posts: 4
Joined: Tue Jan 16, 2007 12:00 am

Post by Ralph » Thu Feb 01, 2007 1:29 pm

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)

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Feb 01, 2007 1:58 pm

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:

Code: Select all

  Series1.AddGanttColor(StartValue,EndValue,Y,'MyMarkText',clTeColor);
You can also customize this text in Series' OnGetMarkText 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
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply