gauge question

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
SPearce
Newbie
Newbie
Posts: 5
Joined: Thu Apr 12, 2012 12:00 am

gauge question

Post by SPearce » Fri Apr 20, 2012 1:53 am

Sir:

I'm trying to work with a circular gauge component. I'm not sure how to use it. My code

Chart1.Series[0].AddX(100);

will move the pointer but only a little - always less that about 10% of the dial. If I press the Help button in the chart editor, I get an error message saying "TChart9.hlp not available". I have TChart2012.hlp but that doesn't seem to work. Is there any documentation or examples to show how to use the gauge components? Any help is appreciated.

Steve Pearce

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: gauge question

Post by Yeray » Fri Apr 20, 2012 2:42 pm

Hi steve,

The basic properties for the Circular Gauge are the axis Minimum and Maximum (SetMinMax), the Value, the RotationAngle, the TotalAngle and the green and red lines.
You can see an example of how you could set some of these properties in the features demo at "All Features\Welcome !\Chart styles\Gauges\Circular Gauge"
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

SPearce
Newbie
Newbie
Posts: 5
Joined: Thu Apr 12, 2012 12:00 am

Re: gauge question

Post by SPearce » Sun Apr 22, 2012 3:46 pm

Yeray:

Thanks for the reply. I think I've almost solved my problem. The followng code works with a simple circular gauge:

procedure TForm1.Button1Click(Sender: TObject);
begin
Series1.Value:=10;
Sleep(500);
Series1.Value:=30;
Sleep(500);
Series1.Value:=80;
end;


With a knob or linear gauge, the gauge only displays the last value. It's as if the gauge component will only respond when the button event handler finishes. What is different about the way the different gauge components handle the code? I'd like to be able to move the gauge multiple times within one button handler for all circular gauges, not just the simple circular one. Thanks for any help.

Steve Pearce

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: gauge question

Post by Yeray » Mon Apr 23, 2012 11:13 am

Hi Steve,

You could force a chart repaint to update the hand:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  Series1.Value:=10;
  Chart1.Draw;

  Sleep(500);
  Series1.Value:=30;
  Chart1.Draw;

  Sleep(500);
  Series1.Value:=80;
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

SPearce
Newbie
Newbie
Posts: 5
Joined: Thu Apr 12, 2012 12:00 am

Re: gauge question

Post by SPearce » Tue Apr 24, 2012 12:02 am

Yeray:

Thanks - it worked.

Steve Pearce

Post Reply