NumericGauge value position inside CircularGaguge

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Thomas
Newbie
Newbie
Posts: 7
Joined: Thu Mar 21, 2013 12:00 am

NumericGauge value position inside CircularGaguge

Post by Thomas » Tue Oct 29, 2013 2:49 pm

Hi!
How to center or move up/down value in NumericGauge inside Circular gauge?
It is always on top of numeric gauge frame. When size of gauge is small it overlaps frame.
Attachments
Screen Shot 2013-10-29 at 4.35.05 PM.png
Screen Shot 2013-10-29 at 4.35.05 PM.png (10.51 KiB) Viewed 1645 times

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

Re: NumericGauge value position inside CircularGaguge

Post by Sandra » Wed Oct 30, 2013 1:10 pm

Hello Thomas,

To change the position of the LinearGauge of your circularGauge you must only set to false, the automatic position as do in next lines of code:

Code: Select all

 Steema.TeeChart.TChart tChart1;
    public Form1()
    {
      InitializeComponent();
      tChart1 = new TChart();
      this.Controls.Add(tChart1);
      tChart1.Top = 150;
      tChart1.Left = 100;
      tChart1.Height = 400;
      tChart1.Width = 550;
      InitializeChart();

    }
    Rectangle tmpG; 
    private void InitializeChart()
    {
      Steema.TeeChart.Styles.CircularGauge circulargaugeL = new CircularGauge(tChart1.Chart);
      circulargaugeL.NumericGauge.Visible = true;
      circulargaugeL.Value = 30;
      circulargaugeL.AutoValueNumericGauge = false;
      circulargaugeL.NumericGauge.Value = 50; 
      tChart1.Draw(); 
      //Custom postion of NumericGauge: 
      circulargaugeL.AutoPositionNumericGauge = false;
      tmpG = circulargaugeL.NumericGauge.CustomBounds;
      tmpG.X = 200;
      tmpG.Y = 300;
      circulargaugeL.NumericGauge.CustomBounds = tmpG; 
    }
    void button1_Click(object sender, EventArgs e)
    {
      tChart1.ShowEditor(); 
    }
Could you tell us if previous code works in your end?

I hope will helps.

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

Thomas
Newbie
Newbie
Posts: 7
Joined: Thu Mar 21, 2013 12:00 am

Re: NumericGauge value position inside CircularGaguge

Post by Thomas » Fri Dec 20, 2013 1:35 pm

Thanks. It works. But i need something like gauge on image. Can you help?
I can't hide border of numeric gauge (circularGauge.NumericGauge.FaceBrush.Visible = false; not working),
can't change text color (circularGauge.NumericGauge.ValueMarker.Shape.Font.Color not working)
Thanks in advance.
Attachments
gauge.png
gauge.png (25.26 KiB) Viewed 1633 times

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

Re: NumericGauge value position inside CircularGaguge

Post by Christopher » Fri Dec 20, 2013 6:46 pm

Hello,
I can't hide border of numeric gauge (circularGauge.NumericGauge.FaceBrush.Visible = false; not working)
This does work, but has to be used in conjunction with:

Code: Select all

series.NumericGauge.ValueMarker.Shape.Transparent = true;
can't change text color (circularGauge.NumericGauge.ValueMarker.Shape.Font.Color not working)
This also works, but has to be used in conjunction with:

Code: Select all

series.NumericGauge.ValueMarker.UsePalette = false;
If it is just text you want, maybe the easiest thing to do is this:

Code: Select all

Steema.TeeChart.Styles.CircularGauge series;

    private void InitializeChart()
    {
      tChart1.AfterDraw += tChart_AfterDraw;
      tChart1.Aspect.View3D = false;
      series = new CircularGauge(tChart1.Chart);
      series.FillSampleValues();

      series.TotalAngle = 180;
    }

    private void tChart_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
    {
      g.Font.Color = Color.White;
      g.Font.Size = 20;
      g.TextOut(g.ChartXCenter - 25, g.ChartYCenter + 70, "303");
    }
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