Page 1 of 1
Linear Gauge Maximum Value Indicator
Posted: Thu Aug 14, 2008 12:23 am
by 9343745
Is it possible to set and/or reset the maximum value indicator ?
If so how is this done ?
Posted: Thu Aug 14, 2008 8:31 am
by Pep
Hi,
there's not a defined property to specify the maximum value indicator (you can specify the maximum of the gauge), nor a way to reset, but it can be accomplished by using the OnAfterDraw event, checking the value indicator and comparing it with the max value you want.
Posted: Thu Aug 14, 2008 8:57 am
by 9343745
Hi
Thanks for the reply.
Could you provide an example of how to accomplish this in the AfterDraw.
As I was not able to find any properties that references the Max Value Indicator.
Thanks
Linear Gauge Maximum Value Indicator
Posted: Thu Aug 14, 2008 9:24 am
by 9343745
Thanks for the reply.
Could you provide an example of how to imp;ement this, as I am having trouble finding properties for the Max Value Indicator
Thabks
Posted: Thu Aug 14, 2008 3:24 pm
by Pep
Hi,
I think I misunderstood your first question. The MaxValueIndicator pointer does not have the ability to be moved via code, setting a value, it always moves automatically to the max value position assigned to the Series, but I've found a bug into the sources of the series which makes to move it only when the value is greater than 100.
This bug will be fixed for the next maintenance releases, also a new feature request have been added on our wish list (allow to set an specific position for MaxValueIndicator manually).
A way around could be to hide the MaxValueIndicator pointer setting its visible property to false and then draw manually the pointer onto the canvas, to a desired position (value). You could use similar code to the following one :
Code: Select all
procedure TForm1.Chart1AfterDraw(Sender: TObject);
var desiredValue : double;
begin
desiredValue := 50;
Chart1.Canvas.Brush.Color := clred;
Series1.MaxValueIndicator.Draw(series1.CalcXPosValue(desiredValue),series1.CalcYPosValue(0)+3);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.MaxValueIndicator.Visible:=false;
end;
Posted: Thu Aug 14, 2008 3:54 pm
by 9343745
Hi
Thanks again.
While testing I did something to move the Indicator, setting the Maximum value, but it did not seem consistent.
The suggested code will work.
On the wish list could you add a second indicator, to be used to display a normal working range
Posted: Mon Aug 18, 2008 10:16 am
by yeray
Hi,
I've added to the "wish list" the possibility to add more indicators that the user could customize.