Transparency property with Points3D

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

Transparency property with Points3D

Post by Mike Jones » Mon Jul 16, 2007 9:00 pm

I am unable to successfully set a transparency property to make 3D points look translucent. It seems if I set the transparency of Pointer.Transparency it is ignored. I have tried to set this programatically and via the Chart Editor and have had no success.

Is this a bug or should I be setting another property?

Edu
Advanced
Posts: 206
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Post by Edu » Tue Jul 17, 2007 7:43 am

Hi Mike

Yes, this is a known issue (TF02012193) in our defect list to be fixed for future releases. Please be aware at this forum for new release announcements and what's being implemented/fixed on them.

In the meantime, a workaround can be set the colors with the wish transparency, for example:

Code: Select all

            points3D1.Add(3, 3,1,Color.FromArgb(255, Color.Red)); //255 is total opaque
            points3D1.Add(1,4,3 ,Color.FromArgb(70, Color.Red));
            points3D1.Add(4,4,4, Color.FromArgb(0, Color.Red)); //0 is total Transparency
            points3D1.Add(5,2,8, Color.FromArgb(100, Color.Red));
            points3D1.Add(3,1,9, Color.FromArgb(200, Color.Red));        
Best Regards,
Edu

Steema Support Central
http://support.steema.com/

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Jul 17, 2007 9:11 am

Hello Mike,

This defect has now been fixed. The fix will be included into the next maintenance release, due out before the end of next week.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

Work around not feasible for us

Post by Mike Jones » Tue Jul 17, 2007 1:07 pm

Unfortunately the work around proposed is not going to work for our product.

I am handed an array of points that are filled in by another assembly. I make a call to the Series.Add(double[],double[],double[]) to add points. When adding many points (i.e. greater than 200,000) this is most efficient.

Is there any other work around that might meet our needs?

Do you know when the bug is scheduled to be fixed?

We have puchased the the source code and currently build TChart.dll. Is it possible to get an early release of the bug fix or at least point us in the direction where the fix will be in the source?

This ability is very important to us. We are using Points3D series to shade regions in our charts. The shading is useless if we cannot control the transparency of the series.

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Jul 17, 2007 1:27 pm

Hello,
Is there any other work around that might meet our needs?
Sure. You can try:

Code: Select all

		private Steema.TeeChart.Styles.Points3D points3d;
		private void InitializeChart()
		{
			double[] xvalues = new double[] { 1, 2, 3 }, yvalues = new double[] { 1, 2, 3 }, zvalues = new double[] { 1, 2, 3 };
			tChart1.Series.Add(points3d = new Steema.TeeChart.Styles.Points3D());
			points3d.Add(xvalues, yvalues,zvalues);
			points3d.Color = Color.FromArgb(50, points3d.Color.R, points3d.Color.G, points3d.Color.B); 
		}
Do you know when the bug is scheduled to be fixed?
It is already fixed, as I mention in my message above.
We have puchased the the source code and currently build TChart.dll. Is it possible to get an early release of the bug fix or at least point us in the direction where the fix will be in the source?
Sure. The fix is in Custom.cs. The method Steema.TeeChart.Styles.SeriesPointer.PrepareCanvas() should now look like this:

Code: Select all

	internal void PrepareCanvas(Graphics3D g, Color colorValue)
		{
			g.Pen = Pen;
			g.Brush = Brush;

			if (aSeries != null)
			{
				if (Brush.Transparency > 0)
				{
					g.Brush.Transparency = Brush.Transparency;
					g.Brush.Color = Drawing.Graphics3D.TransparentColor(g.Brush.Transparency, colorValue);
				}
				else
				{
					g.Brush.Color = colorValue;
				}

				if (aSeries.ColorEach)
				{
					g.Pen.Color = Utils.DarkenColor(colorValue, 60);

					if (Brush.Gradient.Visible)
					{
						g.Brush.Gradient.StartColor = colorValue;
						g.Brush.Gradient.MiddleColor = Color.Empty;
						g.Brush.Gradient.EndColor = Utils.CalcColorBlend(colorValue, Color.White, 60);
					}
				}
			}
		}
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

That worked great!!!!

Post by Mike Jones » Tue Jul 17, 2007 2:09 pm

Thanks so much. I used the new PrepareCanvas method and rebuilt the control. It worked.

One thing I noticed is that while using the Chart Editor at run time there are some issues with transparency getting set back to zero. I would change the transparency for a Points3D series, click on another tab to change some settings and then click back to the series to adjust the transparency again. The transparency value is reset back to zero.

Other than that everything seems to work good.

Mucho Gracias.

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

Post by Narcís » Mon Jul 30, 2007 11:18 am

Hi Mike,

Thanks for the information. I've added this defect to our bug list (TF02012369) to be fixed for future 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

Post Reply