MaxValueIndicator Gauge Control

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Sven
Newbie
Newbie
Posts: 3
Joined: Mon Feb 15, 2010 12:00 am

MaxValueIndicator Gauge Control

Post by Sven » Tue Feb 23, 2010 9:47 am

Hi

How can I set or reset the MaxValueIndicator in vertival gauge control.

TeeChart buid Version: 4.0.2009.42283

Thanks

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

Re: MaxValueIndicator Gauge Control

Post by Yeray » Tue Feb 23, 2010 11:55 am

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).
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

Sven
Newbie
Newbie
Posts: 3
Joined: Mon Feb 15, 2010 12:00 am

Re: MaxValueIndicator Gauge Control

Post by Sven » Thu Feb 25, 2010 8:32 am

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();
        }


Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: MaxValueIndicator Gauge Control

Post by Sandra » Thu Feb 25, 2010 12:42 pm

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Sven
Newbie
Newbie
Posts: 3
Joined: Mon Feb 15, 2010 12:00 am

Re: MaxValueIndicator Gauge Control

Post by Sven » Thu Feb 25, 2010 1:56 pm

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

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

Re: MaxValueIndicator Gauge Control

Post by Yeray » Tue Mar 02, 2010 4:01 pm

Hi Sven,

Now I understood the problem so I've added it to the wish list to be implemented in future releases (TF02014699).
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