Drawing in TChart 3

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
TMac
Newbie
Newbie
Posts: 21
Joined: Mon Mar 10, 2008 12:00 am

Drawing in TChart 3

Post by TMac » Mon Mar 10, 2008 9:42 pm

I'm trying to upgrade an app from TChart .NET Version 2 to the newest build of Version 3.

In Version 2, I was using some methods in the Graphics3D for drawing lines and rectangles. I think they were DrawLine and DrawRectangle. Those seem to be gone in version 3. So, I'm using the Line and Rectangle methods instead.

When I use the Rectangle method, though, it puts a black line around the rectangle, and I can't seem to get rid of it. Am I using the wrong method, is there a reason that the original methods are now gone?

Thanks!

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 Mar 11, 2008 12:30 pm

Hi TMac,

They are not there as they are "native" GDI+ members which can be accessed through g.Graphics.DrawRectangle, for example

Code: Select all

			((Graphics)tChart1.Graphics3D).DrawLine(...)
or in the AfterDraw event:

Code: Select all

			((Graphics)g).DrawLine(...)
To hide rectangle's pen you can do this:

Code: Select all

			tChart1.Graphics3D.Pen.Visible = false;
or this:

Code: Select all

			g.Pen.Visible = false;
Hope this helps!
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