Page 1 of 1

Drawing in TChart 3

Posted: Mon Mar 10, 2008 9:42 pm
by 13048566
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!

Posted: Tue Mar 11, 2008 12:30 pm
by narcis
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!