StripLine StripLine StripLine StripLine Class


Represents the strip lines on a chart.

public ref class StripLine : System::Windows::Forms::DataVisualization::Charting::ChartElement
public class StripLine : System.Windows.Forms.DataVisualization.Charting.ChartElement
type StripLine = class
    inherit ChartElement
Public Class StripLine
Inherits ChartElement


Strip lines, or strips, are horizontal or vertical ranges that shade the background of a chart in regular or custom intervals. You can use strip lines to:

  • Improve readability for looking up individual values on the chart.

  • Separate data points when reading the chart.

  • Highlight dates that occur at regular intervals, for example, to identify weekend data points.

  • Highlight a specific key range of data.

  • Add a threshold line at a specific constant value.

A single StripLine object can either be drawn once, or repeatedly, for a given interval. This action is controlled by the Interval property. When a value of zero is assigned to the Interval property, one strip line will be drawn. When a non-zero value is assigned to the Interval property, a strip line will be drawn repeatedly at each given interval. The location where a strip line is drawn is also affected by the IntervalOffset and IntervalOffsetType properties of the strip line.

Strip lines are always associated with an Axis object. They can be added at both design time and run time.

To add a horizontal or vertical line to display a threshold, set the StripWidth property to a value of 0.0. This will result in a line being drawn. You can use the BorderColor, BorderDashStyle and BorderWidth properties for the color, width and style of the line. No chart background properties (Back*) are used when the StripWidth property is set to 0.0.

Use the Text property of the strip line to associate text with a strip line. The placement and orientation of this text can be controlled by the TextAlignment property.

When multiple strip lines are defined for the same axis, it is possible that the strip lines will overlap. The Z-order of StripLine objects is determined by their order of occurrence in the StripLinesCollection object. This means that the first occurrence is drawn first; the second occurrence is drawn second, and so on.

Strip lines are not supported for the following chart types: Pie, Doughnut, Funnel, Pyramid, Kagi, ThreeLineBreak, PointAndFigure, Polar and Radar.


StripLine() StripLine() StripLine() StripLine()

Initializes a new instance of the StripLine class.


BackColor BackColor BackColor BackColor

Gets or sets the background color of the strip line.

BackGradientStyle BackGradientStyle BackGradientStyle BackGradientStyle

Gets or sets the gradient style of the strip line.

BackHatchStyle BackHatchStyle BackHatchStyle BackHatchStyle

Gets or sets the hatching style of the strip line.

BackImage BackImage BackImage BackImage

Gets or sets the background image of the strip line.

BackImageAlignment BackImageAlignment BackImageAlignment BackImageAlignment

Gets or sets the background image alignment.

BackImageTransparentColor BackImageTransparentColor BackImageTransparentColor BackImageTransparentColor

Gets or sets a color which will be replaced with a transparent color when the background image is drawn.

BackImageWrapMode BackImageWrapMode BackImageWrapMode BackImageWrapMode

Gets or sets the drawing mode of the background image of the strip line.

BackSecondaryColor BackSecondaryColor BackSecondaryColor BackSecondaryColor

Gets or sets the secondary color of the strip line background.

BorderColor BorderColor BorderColor BorderColor

Gets or sets the border color of a strip line.

BorderDashStyle BorderDashStyle BorderDashStyle BorderDashStyle

Gets or sets the border style of the strip line.

BorderWidth BorderWidth BorderWidth BorderWidth

Gets or sets the border width of the strip line.

Font Font Font Font

Gets or sets the font used for the strip line text.

ForeColor ForeColor ForeColor ForeColor

Gets or sets the color of the strip line text.

Interval Interval Interval Interval

Gets or sets the interval for a strip line, and determines if the strip line is drawn once or repeatedly.

IntervalOffset IntervalOffset IntervalOffset IntervalOffset

Gets or sets the offset of grid lines, tick marks, strip lines and axis labels.

IntervalOffsetType IntervalOffsetType IntervalOffsetType IntervalOffsetType

Gets or sets the interval offset type of the strip line.

IntervalType IntervalType IntervalType IntervalType

Gets or sets the interval type of a StripLine object.

Name Name Name Name

Gets the name of the strip line.

StripWidth StripWidth StripWidth StripWidth

Gets or sets the width of a strip line.

StripWidthType StripWidthType StripWidthType StripWidthType

Gets or sets the unit of measurement for the StripWidth property.

Tag Tag Tag Tag

Gets or sets an object associated with this chart element.

(Inherited from ChartElement)
Text Text Text Text

Gets or sets the text of the strip line.

TextAlignment TextAlignment TextAlignment TextAlignment

Gets or sets the text alignment of the strip line.

TextLineAlignment TextLineAlignment TextLineAlignment TextLineAlignment

Gets or sets the text line alignment of the strip line.

TextOrientation TextOrientation TextOrientation TextOrientation

Gets or sets the text orientation.

ToolTip ToolTip ToolTip ToolTip

Gets or sets the tooltip of a strip line.


Dispose() Dispose() Dispose() Dispose()

Releases the resources used by the ChartElement.

(Inherited from ChartElement)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Releases the unmanaged resources used by the StripLine and optionally releases the managed resources.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified Object is equal to the current ChartElement.

(Inherited from ChartElement)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Returns a hash function for a particular type.

(Inherited from ChartElement)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current Object.

(Inherited from ChartElement)

Applies to