Page 1 of 1

Area series transparency

Posted: Tue Jul 22, 2008 4:03 am
by 6923298
Hi,

I'm using Area styles series for my chart and I'm currently using version 3.2.3016.15521.

Code: Select all

Steema.TeeChart.Styles.Area area1 = new Steema.TeeChart.Styles.Area(tChartBidStack.Chart);
area1.AreaLines.Visible = false;
The chart that I get contains vertical and horizontal lines across the area. Is it possible to only show those lines on parts of the chart that doesn't have the area? This means, can I have the area color to be non-transparent so that those lines doesn't appear on the area?

I've tried setting

Code: Select all

area.Transparency = 0
but that didn't work.

Thank you.

Posted: Tue Jul 22, 2008 8:18 am
by narcis
Hi pw,

I'm sorry but I don't understand what are you trying to do exactly. Could you please give us some more information and send us a simple example project we can run "as-is" or an image so that we can see what are you exactly trying to do?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.

Posted: Tue Jul 22, 2008 10:25 pm
by 6923298
Hi Narcis,

I've uploaded a zip file containing 2 images. Previously, when I was using version 2 TChart, I obtained a chart as shown by nontransparent_img.gif. But when I upgraded to version 3, I obtained a chart shown by transparent_img.gif.

As you can see, transparent_img.gif shows a transparent plot, where vertical and horizontal lines can be seen across the area series. But in nontransparent_img.gif, those lines do not appear on the area series.

I would like to have the version 3 of my TChart to have the nontransparent plot.

Thanks.

Posted: Wed Jul 23, 2008 7:24 am
by narcis
Hi pw,

You may need to use line below for each series:

Code: Select all

			area1.AreaBrush.Solid = true;
If this doesn't help please send us a simple example project we can run "as-is" to reproduce the problem here.

Thanks in advance.

Posted: Fri Jul 25, 2008 6:04 am
by 6923298
Hi Narcis,

That didn't work. I've uploaded a sample program to highlight the issue, pls see WindowsApplication4.zip (sorry, didn't rename the file to something better).

As you could see, the chart doesn't show the area in solid color, which is what I want. With the same exact code but using version 2 TChart, I obtain solid color.

Please help.

Thanks.

Posted: Mon Jul 28, 2008 10:47 am
by narcis
Hi pw,

Thanks for the example project. We could finally reproduce the issue here and I found it happens when using quite a big number of points and AreaLines.Visible=false. I've added the defect (TF02013275) to the bug list to be investigated for next releases.

Posted: Mon Jul 28, 2008 9:34 pm
by 6923298
Thanks, Narcis. I'll look forward to the new release.

Posted: Wed Aug 13, 2008 12:53 am
by 6923298
Hi Narcis,

I've installed the latest release of Teechart NET3 (3.5.3146.24805), but the problem still hasn't been fix, even though the release note says it's been fixed.

Is there any workaround on the problem?

Thanks.

Posted: Wed Aug 13, 2008 7:42 am
by Chris
Hello,
pw wrote: I've installed the latest release of Teechart NET3 (3.5.3146.24805), but the problem still hasn't been fix, even though the release note says it's been fixed.
I think you will find that it is fixed. Using the following code:

Code: Select all

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

		private TChart tChart1;

		private void InitializeChart()
		{
			tChart1 = new TChart();
			tChart1.Dock = DockStyle.Fill;
			this.Controls.Add(tChart1);

			tChart1.Aspect.View3D = false;

			Steema.TeeChart.Styles.Area area1 = new Steema.TeeChart.Styles.Area(tChart1.Chart);
			Steema.TeeChart.Styles.Area area2 = new Steema.TeeChart.Styles.Area(tChart1.Chart);

			area1.AreaLines.Visible = false;
			area2.AreaLines.Visible = false;

			area1.Stacked = Steema.TeeChart.Styles.CustomStack.Stack;
			area2.Stacked = Steema.TeeChart.Styles.CustomStack.Stack;

			DateTime startDate = DateTime.Parse("1-Jan-2008");
			DateTime endDate = DateTime.Parse("5-Jan-2008");

			while (startDate <= endDate)
			{
				area1.Add(startDate, 100);
				area2.Add(startDate, 20);

				startDate = startDate.AddMinutes(5);
			}
		}
I got the following result in the previous version:
Image

and the following result in the latest version:
Image

Are you quite sure your project is referring to the right teechart.dll?

Posted: Wed Aug 13, 2008 10:52 am
by 15049271
Hi Christopher,
I am experiencing the same problem. Try this code below.

Code: Select all

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

		private TChart tChart1;

		private void InitializeChart()
		{
			tChart1 = new TChart();
			tChart1.Dock = DockStyle.Fill;
			this.Controls.Add(tChart1);

			tChart1.Aspect.View3D = false;

			Steema.TeeChart.Styles.Area area1 = new Steema.TeeChart.Styles.Area(tChart1.Chart);
			Steema.TeeChart.Styles.Area area2 = new Steema.TeeChart.Styles.Area(tChart1.Chart);

			area1.AreaLines.Visible = false;
			area1.Stairs = true;
			area2.AreaLines.Visible = false;
			area2.Stairs = true;

			area1.Stacked = Steema.TeeChart.Styles.CustomStack.Stack;
			area2.Stacked = Steema.TeeChart.Styles.CustomStack.Stack;

			DateTime startDate = DateTime.Parse("1-Jan-2008");
			DateTime endDate = DateTime.Parse("5-Jan-2008");

			while (startDate <= endDate)
			{
				area1.Add(startDate, 100);
				area2.Add(startDate, 20);
				area2.Add(startDate, 10);

				startDate = startDate.AddMinutes(5);
			}
		}

Posted: Wed Aug 13, 2008 11:15 am
by Chris
Hello,
Remeha wrote: I am experiencing the same problem. Try this code below.
I'm not sure if it's the same problem. Rather than being related to the AreaLines pen being set to false, I think your problem is related to how area series stack when the bottom series has two yvalues with the same xvalue, as can be seen in the following code:

Code: Select all

		private void InitializeChart()
		{
			tChart1 = new TChart();
			tChart1.Dock = DockStyle.Fill;
			this.Controls.Add(tChart1);

			tChart1.Aspect.View3D = false;

			Steema.TeeChart.Styles.Area area1 = new Steema.TeeChart.Styles.Area(tChart1.Chart);
			area1.Stacked = Steema.TeeChart.Styles.CustomStack.Stack;

			area1.Add(1, 1);
			area1.Add(2, 2);
			area1.Add(2, 3);
			area1.Add(4, 4);


			Steema.TeeChart.Styles.Area area2 = new Steema.TeeChart.Styles.Area(tChart1.Chart);
			area2.Stacked = Steema.TeeChart.Styles.CustomStack.Stack;

			area2.Add(1, 1);
			area2.Add(2, 2);
			area2.Add(3, 3);
			area2.Add(4, 4);
		}
I have added this defect to our bug-tracking software with reference number TF02013325.

Posted: Wed Aug 13, 2008 1:00 pm
by 15049271
It seems i have obtained the behaviour i wanted by using this bit of code:

Code: Select all

Area area1 = new Area(myChart.Chart);
area1.Stairs = true;

areaColor = Color.Orange;
area1.AreaLines.Color = areaColor;

...
// some for-loop
area1.Add(x,y, areaColor);
...
If i hadn't set area1.AreaLines.Color, my area would get intermitted with a line that made it seem like there were values in between. This could still be the desired behaviour for other programmers, but i wonder...

Posted: Thu Aug 14, 2008 11:16 pm
by 6923298
Hi Christopher,

Sorry, you're right. My teechart.dll wasn't referred correctly when I first did the update. It's now working correctly.

Thanks.