Page 1 of 1

DrawLine line styles

Posted: Fri Jul 20, 2007 1:55 pm
by 13045625
With the ActiveX version of TeeChart I could get good distinction between line types (dashed, dash-dot, dash-dot-dot, and dotted). With the new .NET version the distinction is not so great - to set the line type I am using, e.g.:

dlNewLine.Pen.Style = System.Drawing.Drawing2D.DashStyle.Dash;
dlNewLine.Pen.DashCap = System.Drawing.Drawing2D.DashCap.Round;

Can anyone suggest how I can get better distinction between the line types. I have posted two images on the upload site:

ActiveX version - TI-BE-5-6-7.jpg (good distinction)
.NET version - ShowLineTypes.jpg (poor distinction)

Posted: Mon Jul 23, 2007 9:08 am
by 9348258
Hello!

Please notice that ActiveX uses gdi and .NET uses gdi+, you can get a better distinction using the below line:

Code: Select all

 tChart1.Aspect.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed;

Posted: Mon Jul 23, 2007 9:45 am
by 13045625
Thanks for the suggestion. I tried with SmoothingMode.HighSpeed - it didn't seem to make much difference. Possibly SmoothingMode.HighQuality is slightly better but it's still not as good as previous. In particular I would like to lengthen the dashes and the gaps between them.

Posted: Mon Jul 23, 2007 11:46 am
by Chris
Hello,


Try setting the ChartPen's Style to DashStyle.Custom and defining your own
ChartPen.DashPattern in a manner similar to:
http://msdn2.microsoft.com/en-us/librar ... ttern.aspx