Page 1 of 1

How do I change series Brush and LinePen

Posted: Fri Jul 09, 2004 2:13 pm
by 8125640
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

Posted: Tue Jul 13, 2004 6:13 am
by Chris
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.