Page 1 of 1
MaxValueIndicator Gauge Control
Posted: Tue Feb 23, 2010 9:47 am
by 15655255
Hi
How can I set or reset the MaxValueIndicator in vertival gauge control.
TeeChart buid Version: 4.0.2009.42283
Thanks
Re: MaxValueIndicator Gauge Control
Posted: Tue Feb 23, 2010 11:55 am
by yeray
Hi Sven,
Could you please explain what are you exactly trying to change in the MaxValueIndicator. the following code seems to work as expected here.
Code: Select all
Steema.TeeChart.Styles.VerticalLinearGauge gauges1 = new Steema.TeeChart.Styles.VerticalLinearGauge(tChart1.Chart);
gauges1.Maximum = 1000;
gauges1.Value = 500;
gauges1.MaxValueIndicator.Color = Color.Green;
Also note that the build you are using (4.0.2009.42283) is not the latest (4.0.2009.62332).
Re: MaxValueIndicator Gauge Control
Posted: Thu Feb 25, 2010 8:32 am
by 15655255
Hi Alonso
Thanks for your answer.
The Problem is not the maximum or minimum value of the gauge. I want to reset the MaxValueIndicator in the gauge, after a run. I miss a a property like gauge1.MaxValueIndicator.Reset()
Code: Select all
public void InitGauge()
{
textBoxValue.Text = "0";
verticalLinearGauge.Minimum = MinValue;
verticalLinearGauge.Maximum = MaxValue;
verticalLinearGauge.Value = 0.0;
verticalLinearGauge.Axis.Title.Text = AxisTitle + " " + Unit;
verticalLinearGauge.GreenLineStartValue = MinValue;
verticalLinearGauge.GreenLineEndValue = MaxValue * 0.78;
verticalLinearGauge.RedLineStartValue = MaxValue * 0.8;
verticalLinearGauge.RedLineEndValue = MaxValue;
double axisIncrement = (MaxValue / 5);
verticalLinearGauge.Axis.Increment = Math.Round(axisIncrement, 2);
// cannot reset or init the MaxValueIndicator after a run
verticalLinearGauge.MaxValueIndicator = MinValue;
verticalLinearGauge.MaxValueIndicator.Reset();
verticalLinearGauge.MaxValueIndicator.Clear();
}
Re: MaxValueIndicator Gauge Control
Posted: Thu Feb 25, 2010 12:42 pm
by 10050769
Hello Sven,
MaxValueIndicator is an object that has many properties associated. Please, could you say us exactly what you want to do Clear() or Reset() methods and what of these properties you would like that be changed
Thanks,
Re: MaxValueIndicator Gauge Control
Posted: Thu Feb 25, 2010 1:56 pm
by 15655255
Hi Sandra
I found the problem with the MaxValueIndicator. I have created an vertical gauge control in the Designer from Studio 2008. If the Form InitilizeComponent() is initilized the gauge control value is the value from designer (gauge1.value = 17.89146576)
Now I create a new gauge Object with gauge.value = 0.0 in a Init() method. If I want to reset the MaxValueIndicator I call the init method and create a new gaugeControl.
Code: Select all
public Form1()
{
InitializeComponent();
if (!DesignMode)
{
verticalLinearGauge1.Dispose();
tChart3.Series.Remove(verticalLinearGauge1);
verticalLinearGauge1 = null;
verticalLinearGauge1 = new Steema.TeeChart.Styles.VerticalLinearGauge();
verticalLinearGauge1.Value = 0.0;
verticalLinearGauge1.Maximum = 50;
verticalLinearGauge1.Minimum = 0;
tChart3.Series.Add(verticalLinearGauge1);
PerformLayout();
}
}
Thanks for your help !
best regards
sven
Re: MaxValueIndicator Gauge Control
Posted: Tue Mar 02, 2010 4:01 pm
by yeray
Hi Sven,
Now I understood the problem so I've added it to the wish list to be implemented in future releases (TF02014699).