Problems with linear Gauge
Posted: Sun Apr 14, 2013 8:12 pm
Hi,
I have a linear gauge (see attachment Gauge.jpg). I would like to change the brush of the hand like this
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:
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;
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';
chart3.FreeAllSeries();
chart3.RemoveAllSeries;
with Chart3.AddSeries(TLinearGauge.Create(self)) as TLinearGauge do
begin
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;
end;