How do I change series Brush and LinePen

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Jeff Motter
Newbie
Newbie
Posts: 5
Joined: Fri May 28, 2004 4:00 am

How do I change series Brush and LinePen

Post by Jeff Motter » Fri Jul 09, 2004 2:13 pm

Using VB.NET.

With the ActiveX graph, I used to be able to set the color and line width of a series like this:
TChart1.AddSeries (scLine)
TChart1.Series(0).asLine.LinePen.Width = 2
TChart1.Series(0).Color = vbRed
TChart1.Series(0).Title = "AMPS Radios"

I've got the color figured out, but I can't find the LinePen width.
Here's what I have:
TChart1.Series.Add(New Steema.TeeChart.Styles.Line)
TChart1.Series(0).Clear()
TChart1.Series(0).asLine.LinePen.Width = 2
TChart1.Series(0).Color = Color.Red
TChart1.Series(0).Title = "AMPS Radios"

I want the whole series to be formatted the same, not the individual points.

Thanks!

Jeff
Last edited by Jeff Motter on Tue Jul 13, 2004 12:57 pm, edited 1 time in total.

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Jul 13, 2004 6:13 am

Hi Jeff,

VB6.0:

Code: Select all

TChart1.AddSeries (scLine)
TChart1.Series(0).asLine.LinePen.Width = 2
TChart1.Series(0).Color = vbRed
TChart1.Series(0).Title = "AMPS Radios"
TChart1.Series(0).FillSampleValues 20
VB.NET

Code: Select all

TChart1.Series.Add(New Steema.TeeChart.Styles.Line)
TChart1.Series(0).Clear()
CType(TChart1.Series(0), Steema.TeeChart.Styles.Line).LinePen.Width = 2
TChart1.Series(0).Color = Color.Red
TChart1.Series(0).Title = "AMPS Radios"
TChart1.Series(0).FillSampleValues(20)
The above two code snippits, the first for TeeChart AXv6 and the second for TeeChart for .NET, have the same functionality here. There are some issues with the painting of the LinePen when the width is greater than 1 but these will be ironed out in future releases.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply