All,
Appreciate the feedback received in my previous
GUI advice thread. I went with some of the advice; using TA3nalogGauge as the basis for the start of my GUI. I tried modifying the behavior of TA3nalogGauge to include a min and max needle; but I couldn't get it to work right.
I've added a Lazarus TChart to the GUI so I can give a chart representation of the current being utilized during the various "phases" of the RGB sequence. There are 5 configurable LED "strings" on this product; each can be configured with their own color/flashing sequence.
The Chart currently needs to display two Axis... one on the Left which shows the individual currents and one on the right which displays the total current for the entire device. I've tried in vain using the following article:
http://wiki.freepascal.org/TAChart_Tutorial:_Dual_y_axis,_Legendbut I can't seem to get the autoscale to work properly. As you can see in the picture attached; the right axis will not auto-scale correctly. I pretty sure the values never exceed 1600mA... so there is no reason for the autoscale to factor up to 32000mA.
What I need/what is for the Left and Right Axis to scale independently so both "waveforms" display at full scale.
Thoughts?
object CurrentChart: TChart
AnchorSideLeft.Control = CurrentGauge
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = CurrentGauge
AnchorSideRight.Control = FlashGB
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 209
Height = 231
Top = 496
Width = 367
AxisList = <
item
Grid.Color = clBtnShadow
TickColor = clBtnFace
Marks.LabelBrush.Style = bsClear
Minors = <>
Range.Max = 1
Range.UseMin = True
Title.LabelFont.Orientation = 900
Title.LabelBrush.Style = bsClear
Transformations = LeftAxisTransformations
end
item
Grid.Color = clBtnShadow
TickColor = clBtnFace
Alignment = calBottom
Marks.LabelBrush.Style = bsClear
Minors = <>
Range.Max = 40
Range.UseMax = True
Range.UseMin = True
Title.LabelBrush.Style = bsClear
end
item
Alignment = calRight
Group = 1
Marks.LabelBrush.Style = bsClear
Minors = <>
Range.Max = 1
Range.UseMin = True
Title.LabelBrush.Style = bsClear
Transformations = RightAxisTransformations
end>
BackColor = clBlack
Foot.Brush.Color = clBtnFace
Foot.Font.Color = clBlue
Frame.Color = clBtnFace
Legend.Alignment = laBottomCenter
Legend.ColumnCount = 5
Legend.Transparency = 50
Legend.Visible = True
Title.Brush.Color = clBtnFace
Title.Font.Color = clBlue
Title.Text.Strings = (
'TAChart'
)
object LeftAxisTransformations: TChartAxisTransformations
left = 248
top = 512
object LeftAxisTransform: TAutoScaleAxisTransform
end
end
object RightAxisTransformations: TChartAxisTransformations
left = 512
top = 512
object RightAxisTransform: TAutoScaleAxisTransform
end
end