Dashed Line

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
mikethelad
Newbie
Newbie
Posts: 58
Joined: Thu Jul 05, 2012 12:00 am

Dashed Line

Post by mikethelad » Thu Aug 02, 2012 11:21 am

Am trying to get a thick, red, dashed line on a line graph, I have got red to work by:-

Steema.TeeChart.Styles.Line line = new Steema.TeeChart.Styles.Line(this.WebChart1.Chart);
line.Brush.Color = System.Drawing.Color.Red;

I believe from the help file to get dashed:-

line.Pen.Style = System.Drawing.Drawing2D.DashStyle.Dash

But this does not like Pen after the line, what am I missing?

How do I make the line thicker?

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Dashed Line

Post by Sandra » Thu Aug 02, 2012 11:54 am

Hello mikethelad,

To achieve change the Pen of line series you must access to Pen of line with LinePen property as do in next line of code:

Code: Select all

 line1.LinePen.Style = System.Drawing.Drawing2D.DashStyle.Dash;
I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / 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

mikethelad
Newbie
Newbie
Posts: 58
Joined: Thu Jul 05, 2012 12:00 am

Re: Dashed Line

Post by mikethelad » Thu Aug 02, 2012 12:13 pm

Yes that worked, thanks

How do I make it thicker?

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Dashed Line

Post by Sandra » Thu Aug 02, 2012 1:29 pm

Hello mikethelad,

You can change the LinePen width as do in next line of code:

Code: Select all

line1.LinePen.Width = 2;
Thanks,
Best Regards,
Sandra Pazos / 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