The Line Object (SALine)
The Line object represents the appearance a chart line. ExcelWriter includes the following line
objects:
Line Methods and Properties
| Line Methods and Properties |
| LineColor |
Sets or retrieves the color of a Line object
(AxisLine,
MajorGridline,
MinorGridline,
Wall3DBorder,
Series Border, or
ChartFrame Border).
The following sets the color of a ChartArea's border to red.
Chart.ChartArea.Border.Linecolor = rgb(255,0,0)
Note: To display a series border and its markers in one solid
color, set all of the following properties to the desired color:
For example:
objSeries1.Border.LineColor = rgb(255,0,0)
objSeries1.MarkerFormat.BackgroundColor = rgb(255,0,0)
objSeries1.MarkerFormat.ForegroundColor = rgb(255,0,0)
Top |
| LineFormatting |
Sets or retrieves the type of formatting applied to an Line object.
The three types of formatting and their codes are,
| saxlsCreationAutomatic | 0 |
| saxlsCreationNone | 1 |
| saxlsCreationCustom | 2 |
When LineFormatting is set to saxlsCreationAutomatic (0), the default formatting settings will be applied to
the Line object. SaxlsCreationCustom (2) enables custom formatting assigned to the Line object (colors or style).
SaxlsCreationNone will remove all Line formatting (default or custom).
The following sets LineFormatting to saxlsCreationNone for the border of the chart area,
disabling all formatting.
Chart.ChartArea.Border.AreaFormatting = 1
Top |
| LineStyle |
Sets or retrieves the style of a Line object
(AxisLine,
MajorGridline,
MinorGridline,
Wall3DBorder,
Series Border, or
ChartFrame Border).
ExcelWriter supports nine line styles:
| Solid | 0 |
| Dash | 1 |
| Dot | 2 |
| Dash-Dot | 3 |
| Dash-Dot-Dot | 4 |
| Dark Gray | 5 |
| Medium Gray | 6 |
| Light Gray | 8 |
The following sets the style of the minor gridlines on the Y axis to Dash-Dot-Dot.
ValueAxis.MinorGridline.LineStyle = 4
Top |
| LineWeight |
Sets or retrieves the weight of a Line object
(AxisLine,
MajorGridline,
MinorGridline,
Wall3DBorder,
Series Border, or
ChartFrame Border). LineWeight has four
possible values:
| HairLine | 0 |
| SingleLine | 1 |
| MediumLine | 2 |
| WideLine | 3 |
The following sets the weight of the major gridlines on the Y axis to WideLine.
ValueAxis.MajorGridline.LineWeight = 3
Top |
Copyright © 2003, SoftArtisans, Inc.