How change background of a numeric gauge

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 background of a numeric gauge

Post by acastro » Thu Mar 20, 2014 11:17 am

I have changed the facebrush color to red, but I didn't find how to change the background color of the number

Thanks
Attachments
background.png
background.png (3.74 KiB) Viewed 8254 times

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

Re: How change background of a numeric gauge

Post by Christopher » Fri Mar 21, 2014 1:17 pm

wakeup wrote:I have changed the facebrush color to red, but I didn't find how to change the background color of the number
Try:

Code: Select all

    private void InitializeChart()
    {
      NumericGauge series = new Steema.TeeChart.Styles.NumericGauge(tChart1.Chart);
      series.FillSampleValues();

      series.FaceBrush.Gradient.Visible = false;
      series.FaceBrush.Color = Color.Red;

      foreach (Marker item in series.Markers)
      {
        item.UsePalette = false;
        item.Shape.Gradient.Visible = false;
        item.Shape.Color = Color.Red;
      }
    }
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 background of a numeric gauge

Post by acastro » Fri Mar 21, 2014 4:31 pm

It doesn't run. I don't know why is it yellow...

Is it possible to chanche from charteditor?
Attachments
background.png
background.png (18.99 KiB) Viewed 8236 times

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

Re: How change background of a numeric gauge

Post by Christopher » Mon Mar 24, 2014 12:10 pm

wakeup wrote:It doesn't run. I don't know why is it yellow...
The code I posted works as expected using TeeChart v.4.1.2014.02240 - which version are you using?
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 background of a numeric gauge

Post by acastro » Mon Mar 24, 2014 12:33 pm

Sorry, you are right, it runs. Thanks

Post Reply