Page 1 of 1

Area colors

Posted: Tue Jan 13, 2009 1:00 am
by 14045174
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.

Posted: Tue Jan 13, 2009 9:23 am
by narcis
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.

Posted: Tue Jan 13, 2009 2:07 pm
by 14045174
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?

Posted: Tue Jan 13, 2009 2:19 pm
by narcis
Hi UserLS,

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

Code: Select all

			area1.Color = Color.Lime;

Posted: Tue Jan 13, 2009 2:51 pm
by 14045174
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?

Posted: Tue Jan 13, 2009 3:05 pm
by narcis
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.

Posted: Mon Feb 09, 2009 9:09 pm
by 14045174
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).

Posted: Tue Feb 10, 2009 10:43 am
by narcis
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.

Posted: Tue Feb 10, 2009 2:14 pm
by 14045174
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:

Posted: Tue Feb 10, 2009 2:29 pm
by 14045174
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.

Posted: Tue Feb 10, 2009 3:18 pm
by narcis
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.

Posted: Thu Feb 12, 2009 2:51 pm
by narcis
Hi UserLS,

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

http://www.teechart.net/support/viewtopic.php?t=9220