Page 1 of 1

Dashed Line

Posted: Thu Aug 02, 2012 11:21 am
by 15662902
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?

Re: Dashed Line

Posted: Thu Aug 02, 2012 11:54 am
by 10050769
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,

Re: Dashed Line

Posted: Thu Aug 02, 2012 12:13 pm
by 15662902
Yes that worked, thanks

How do I make it thicker?

Re: Dashed Line

Posted: Thu Aug 02, 2012 1:29 pm
by 10050769
Hello mikethelad,

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

Code: Select all

line1.LinePen.Width = 2;
Thanks,