Problems with linear Gauge

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Posts: 23
Joined: Mon May 07, 2012 12:00 am

Problems with linear Gauge

Post by Friis » Sun Apr 14, 2013 8:12 pm


I have a linear gauge (see attachment Gauge.jpg). I would like to change the brush of the hand like this

Code: Select all

Hand.Brush.Style := BsHorizontal;
so that the hand will have horizontal lines similar to the attached sketch "sketch.jpg"

However, setting brushstyle to BsHorizontal does to seem to work - what am I doing wrong?

This is the entire code:

Code: Select all

Chart3.Title.Visible := false;
chart3.LeftAxis.LabelsFont.Size := 22;
chart3.LeftAxiS.Increment := 0.25;
chart3.LeftAxis.AxisValuesFormat := '#0.00';

with Chart3.AddSeries(TLinearGauge.Create(self)) as TLinearGauge do

    Horizontal := false;
    RedLine.Visible := false;

    GreenLine.StartValue := -0.5;
    GreenLine.EndValue := 1.5;
    GreenLine.Gradient.Visible := true;
    GreenLine.Gradient.StartColor := cllime;
    GreenLine.Gradient.EndColor := cllime;
    GreenLine.Color := cllime;
    GreenLine.VertSize := 20;

    Minimum := -1.0;
    Maximum  := 2;

    Axis.Increment := 0.25;
    ValueFormat := '#0.00';

    Hand.Brush.Color := clBlue;
    Hand.Brush.BackColor := clred;
    Hand.Transparency := 20;
    Hand.Emboss.Visible := false;
    Hand.Brush.Style := BsHorizontal;
    Hand.Pen.Color := clNone;
    Hand.Gradient.Visible := true;

    Ticks.VertSize := 100;
    Ticks.Visible := false;

    Face.Color := clwhite;
    Face.RoundSize := 0;
    Face.Gradient.Visible := false;

    Frame.InnerBrush.BackColor := clBlack;
    Frame.MiddleBrush.BackColor := clGray;
    Frame.OuterBrush.BackColor := clBlack;

gauge.JPG (45.17 KiB) Viewed 1039 times
sketch.JPG (10.61 KiB) Viewed 1025 times

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

Re: Problems with linear Gauge

Post by Yeray » Wed Apr 17, 2013 1:45 pm

Hi Hans,

Right, the pattern colors are difficult to control. A revision of the Patterns is already present in the wish list as an enhancement for future releases (TV52016522).

I've found what could be a fix for the issue you've reported. It would allow you to draw the blue&transparent pattern in the LinearGauge Hand. However, possible collateral damages are being studied.
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

Post Reply