Modify Background

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
ICS
Newbie
Newbie
Posts: 10
Joined: Wed Sep 22, 2010 12:00 am

Modify Background

Post by ICS » Fri Nov 19, 2010 2:13 pm

Hello
Does anyone know, how I can modify the background of my TChart?
I want to color the range 0-10 (X-Value) in blue, the range 10-90 (X-Value) in dark blue and the range 90-100 (X-Value) in black.

I didn't really find information about this in the internet or the tutorials...
Thanks a lot !!

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

Re: Modify Background

Post by Sandra » Fri Nov 19, 2010 3:43 pm

Hello ICS,

I recommend two options for change color of your TChart background:

First: Using property Gradient of Chart Panel and Chart Walls as do in next lines of code:

Code: Select all

  tChart1.Panel.Gradient.StartColor = Color.White;
          tChart1.Panel.Gradient.MiddleColor = Color.Blue;
          tChart1.Panel.Gradient.EndColor = Color.Black;
          tChart1.Walls.Back.Gradient.StartColor = Color.White;
          tChart1.Walls.Back.Gradient.MiddleColor = Color.Blue;
          tChart1.Walls.Back.Gradient.EndColor = Color.Black;

Second:
Using property Gradient of Chart Panel and change property visible of Walls to false, as do below:

Code: Select all

          tChart1.Panel.Gradient.StartColor = Color.White;
          tChart1.Panel.Gradient.MiddleColor = Color.Blue;
          tChart1.Panel.Gradient.EndColor = Color.Black;
          tChart1.Walls.Back.Visible = false;
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

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Modify Background

Post by Yeray » Fri Nov 19, 2010 5:30 pm

Hi ICS,

You could use Color Band tools to do it. Take a look at the example at All Features\Welcome !\Tools\Color Band.
You'll find this and many other examples in the Feature demo included with the installation. A shortcut to it can be found in the StartMenu, in TeeChart programs group.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

ICS
Newbie
Newbie
Posts: 10
Joined: Wed Sep 22, 2010 12:00 am

Re: Modify Background

Post by ICS » Mon Nov 22, 2010 11:11 am

Hola
Gracias for the answer.
I added a color band. This is exactly what I needed :-)
I couldn't use the "panel.gradient", because I need a defined line. In the Gradient, the color change is half transperant.

Hasta luego
Eric

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Modify Background

Post by Yeray » Mon Nov 22, 2010 1:49 pm

Hola Eric,

You're welcome.
Salut! :D
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply