I am having difficulty setting the style for simple line charts. Does anybody have any simple sample code?
Why is it that I can control the width and style of the line with the following code but it won't set the color?
Dim Line_LCL As New Steema.TeeChart.Styles.Line(WebChart1.Chart)
With Line_LCL.LinePen
.Width = 2
.Color = Color.Orange
.Style = Drawing.Drawing2D.DashStyle.Dash
End With
I have to later go in and set the color with:
.Series(3).Color = Color.Orange
Progamatically Setting Line Chart Properties
Hi,
A simple example could be :I am having difficulty setting the style for simple line charts. Does anybody have any simple sample code?
Code: Select all
Dim Line_LCL As New Steema.TeeChart.Styles.Line(WebChart1.Chart)
Line_LCL.FillSampleValues(10)
WebChart1.Chart.Aspect.View3D = False
With Line_LCL
.LinePen.Width = 10
.LinePen.Style = Drawing2D.DashStyle.Dash
.Color = Color.Orange
End With
This depends if you're are working in 2D or 3D mode, the LinePen.Color property is used to set the color of the Outline that appears in 3D mode, so to change the color of the Series you always should use the Series.Color property.Why is it that I can control the width and style of the line with the following code but it won't set the color?
Pep Jorge
http://support.steema.com
http://support.steema.com