Area colors

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Area colors

Post by UserLS » Tue Jan 13, 2009 1:00 am

In my program, to set area color, I am using AreaBrush property. After I have installed new (Dec 19) release, my graphs look really strange. The area itself is white, but the symbol on the legend is still showing the correct color. I've noticed, that using bBrush instead of AreaBrush is fixing the color problem, but now, I can specify a different color for the top part of the area, but it does not work anymore (used to work in prior version). But the funniest graph I am getting now, if I set bBrush.Gradient.Visible = true and the direction is vertical. Now my area is divided into halves and the gradient fill is drawn independently on the top and the bottom halves.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Jan 13, 2009 9:23 am

Hi UserLS,

I can't reproduce this exact behavior but found some inconsistencies here. AreaBrush doesn't work for me, bBrush or Brush set full series color while if setting bBrush.Gradient.Visible only sets the gradient for the top part of the area series:

Code: Select all

		public Form1()
		{
			InitializeComponent();
			InitializeChart();
		}

		private void InitializeChart()
		{
			Area area1 = new Area(tChart1.Chart);
			
			area1.FillSampleValues();
			//area1.Brush.Color = Color.Green;
			//area1.AreaBrush.Color = Color.Red;
			//area1.bBrush.Color = Color.Lime;
			area1.bBrush.Gradient.Visible = true;
			area1.bBrush.Gradient.Direction = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
		}
So I've added the issue to the list (TF02013715) to be investigated and enhanced for next releases.
Best Regards,
Narcís Calvet / 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

UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Post by UserLS » Tue Jan 13, 2009 2:07 pm

So, I guess my question is: what I should use? Do I need to change to bBrush or AreaBrush is the one I should use, but for now it is broken?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Jan 13, 2009 2:19 pm

Hi UserLS,

Yes, AreaBrush seems to be broken but you can use Area.Color:

Code: Select all

			area1.Color = Color.Lime;
Best Regards,
Narcís Calvet / 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

UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Post by UserLS » Tue Jan 13, 2009 2:51 pm

Well, if it was only about the color... So, do I need to leave my code alone and wait, until the AreaBrush is working again? Or should I switch to use bBrush, and wait until it is fixed?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Jan 13, 2009 3:05 pm

Hi UserLS,

This may depend on your immediate needs. I'd recommend you to be aware at this forum or subscribe to our RSS news feed for new release announcements and check release notes included for the bug fixes made in that version and their description. In that case issue ID is TF02013715.
Best Regards,
Narcís Calvet / 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

UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Post by UserLS » Mon Feb 09, 2009 9:09 pm

More to the same problem:
  • Area.ColorEach affects only the top of the area (and if I set stacked property and this is not the top series - ColorEach does nothing).
  • If I change settings on the TChart.Panel.3D (like elevation, perspective), than the top part gets disjoined from the rest of the area, making really weird looking graph.
  • If I am trying to set patterns, using the bottom patterns button, I can set its background color, but the area does not pay any attention to it.
With all the problems listed here (including strange Gradient behavior), area series are broken to the point, that makes them completely unusable (at least for us).

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Feb 10, 2009 10:43 am

Hi UserLS,
* Area.ColorEach affects only the top of the area (and if I set stacked property and this is not the top series - ColorEach does nothing).
Ok, I could reproduce this and added this to the issue above too.
* If I change settings on the TChart.Panel.3D (like elevation, perspective), than the top part gets disjoined from the rest of the area, making really weird looking graph.
Could reproduce this one too and added it to the defect list (TF02013848).
* If I am trying to set patterns, using the bottom patterns button, I can set its background color, but the area does not pay any attention to it.
I'm not sure how I should reproduce the issue as it seems to work fine for me here. Could you please let us know the exact steps we should follow?

Thanks in advance.
Best Regards,
Narcís Calvet / 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

UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Post by UserLS » Tue Feb 10, 2009 2:14 pm

Ok, open your editor, create an area series. Set its color to blue. Fill with data. Go to Format tab, Options. There are 2 pattern buttons (my favorite - no explanation, what is what, no logic behind, what works where!) Anyway, I found, that the bottom one controls the area itself, while the top seems to be for the top portion of the series. So, I go to the bottom button, switch to the hutch page. I can select brush style (which works) and foreground color (works too), but selecting background color (say, set it to red) does nothing. I mean, it is shown correctly on the hutch editor, but the area series is not changing. But wait! It is getting more fun! Go to the top patterns button. Switch this one to hutch - the top portion of the area is using pattern now. You can change the brush style (works as expected), the foreground color (is fine). Now, change the background color... it is changed for both top portion AND the area itself. As I've sad, the area series are broken so badly, that they are not usable at all at this point. Sorry. :oops:

UserLS
Advanced
Posts: 247
Joined: Wed May 23, 2007 12:00 am

Post by UserLS » Tue Feb 10, 2009 2:29 pm

BTW: I did try to switch to the bar series (to avoid using area). Well, pattern button there (thanks god, only one!) has its own problems. On the solid page I can select a color, but what the point? It does not even remember my selection there (switch to another page and come back - your selection is gone!). Same is true about background color on the hutch page... So, either do not let me select something, or, if there is an option for me to select something - than make it work.

At this point, your editors are so broken, that I am almost forced to throw them away and develop my own instead, but the problem is - I do not have time to do so.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Feb 10, 2009 3:18 pm

Hi UserLS,
Ok, open your editor, create an area series. Set its color to blue. Fill with data. Go to Format tab, Options. There are 2 pattern buttons (my favorite - no explanation, what is what, no logic behind, what works where!) Anyway, I found, that the bottom one controls the area itself, while the top seems to be for the top portion of the series. So, I go to the bottom button, switch to the hutch page. I can select brush style (which works) and foreground color (works too), but selecting background color (say, set it to red) does nothing. I mean, it is shown correctly on the hutch editor, but the area series is not changing. But wait! It is getting more fun! Go to the top patterns button. Switch this one to hutch - the top portion of the area is using pattern now. You can change the brush style (works as expected), the foreground color (is fine). Now, change the background color... it is changed for both top portion AND the area itself. As I've sad, the area series are broken so badly, that they are not usable at all at this point. Sorry.
Yes, that's true. I've also added this to the issue.
BTW: I did try to switch to the bar series (to avoid using area). Well, pattern button there (thanks god, only one!) has its own problems. On the solid page I can select a color, but what the point? It does not even remember my selection there (switch to another page and come back - your selection is gone!). Same is true about background color on the hutch page... So, either do not let me select something, or, if there is an option for me to select something - than make it work.
I could see this works for first color change but not for following changes. I've also added the defect to the list (TF02013851) to be fixed.
Best Regards,
Narcís Calvet / 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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Feb 12, 2009 2:51 pm

Hi UserLS,

A new version with a fix for TF02013848 has just been published:

http://www.teechart.net/support/viewtopic.php?t=9220
Best Regards,
Narcís Calvet / 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

Post Reply