Page 1 of 1

How change start and en value of red green lines?

Posted: Mon Mar 17, 2014 11:59 am
by 15654539
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

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

Posted: Tue Mar 18, 2014 8:28 am
by Christopher
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;
    }

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

Posted: Tue Mar 18, 2014 10:33 am
by 15654539
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

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

Posted: Tue Mar 18, 2014 11:31 am
by Christopher
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;
    }