WPF: NumericGauge

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
gbs
Newbie
Newbie
Posts: 7
Joined: Mon May 27, 2013 12:00 am

WPF: NumericGauge

Post by gbs » Wed Aug 21, 2013 11:31 am

Using latest release I try to change the colors of the markers and background color in a numericgauge but it seems I'm not changing the correct values or it just won't work.

To change the background I use .FaceBrush.Color and vor the markers I use .marker(0).shape.font.color. Is that correct?

Thanks in advance!

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

Re: WPF: NumericGauge

Post by Sandra » Thu Aug 22, 2013 10:19 am

Hello gbs,

Ok. If you want change the aspect of NumericGauge by code, you can do something as I suggest in next code:

Code: Select all

    Steema.TeeChart.TChart tChart1; 
    public Form1()
    {
      InitializeComponent();
      tChart1 = new TChart();
      this.Controls.Add(tChart1);
      tChart1.Left = 150;
      tChart1.Top = 100; 
      InitializeChart();
    }
    //SizeF sizeTitle;
    Steema.TeeChart.Styles.NumericGauge numericgauge1; 
    private void InitializeChart()
    {
      numericgauge1 = new NumericGauge(tChart1.Chart);
      numericgauge1.FaceBrush.Gradient.Visible = false; 
      numericgauge1.FaceBrush.Color = Color.Green;
      //Must disable the defaulte palette. 
      numericgauge1.Markers[0].UsePalette = false; 
      numericgauge1.Markers[0].Shape.Font.Color = Color.Red;
      //Change color brush of Marker to Green. 
      numericgauge1.Markers[0].Shape.Color = Color.Green; 
      //Do transparent the burhs of Marker. 
     // numericgauge1.Markers[0].Shape.Transparent = true;
}

Could you tell us previous code help you to achieve as you want?

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

gbs
Newbie
Newbie
Posts: 7
Joined: Mon May 27, 2013 12:00 am

Re: WPF: NumericGauge

Post by gbs » Thu Aug 22, 2013 2:37 pm

Hi Sandra,

thanks a lot, that worked without any problems!

Post Reply