How change start and en value of red green lines?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
acastro
Advanced
Posts: 204
Joined: Tue Oct 27, 2009 12:00 am

How change start and en value of red green lines?

Post by acastro » Mon Mar 17, 2014 11:59 am

How can I change start and en value of red green lines in CircularGauge series from the code?

I see in the forum someone using the properties StartValue and EndValue but it seems not exist in my version.

Thanks

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: How change start and en value of red green lines?

Post by Christopher » Tue Mar 18, 2014 8:28 am

wakeup wrote:I see in the forum someone using the properties StartValue and EndValue but it seems not exist in my version.
Try:

Code: Select all

    private Steema.TeeChart.Styles.CircularGauge series1;

    private void InitializeChart()
    {
      tChart1.Aspect.View3D = false;

      series1 = new Steema.TeeChart.Styles.CircularGauge(tChart1.Chart);
      series1.FillSampleValues();
    }

    private void button1_Click(object sender, EventArgs e)
    {
      series1.RedLineStartValue += 10;
    }
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

acastro
Advanced
Posts: 204
Joined: Tue Oct 27, 2009 12:00 am

Re: How change start and en value of red green lines?

Post by acastro » Tue Mar 18, 2014 10:33 am

It runs thanks

I have another question related to red/green lines. I would like to set the green line exactly the same appearance than the red line ( in red).
I'm trying this but it doesn't run

Code: Select all

                     circularGauge.GreenLine.Style = circularGauge.RedLine.Style;
                        circularGauge.GreenLine.Shadow = circularGauge.RedLine.Shadow;
                        circularGauge.GreenLine.Color = circularGauge.RedLine.Color;
How can I do it?

Thanks

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: How change start and en value of red green lines?

Post by Christopher » Tue Mar 18, 2014 11:31 am

wakeup wrote:How can I do it?
You could clone it, e.g.

Code: Select all

    private void button1_Click(object sender, EventArgs e)
    {
      //series1.RedLineStartValue += 10;

      series1.RedLine = series1.GreenLine.Clone() as GaugeSeriesPointer;
      series1.RedLineStartValue = 80;
      series1.RedLineEndValue = 100;
    }
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply