Strip Class
Represents a strip line within a chart control’s diagram.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v18.1.dll
Declaration
[TypeConverter(typeof(StripTypeConverter))]
public class Strip :
ChartElementNamed,
IStrip,
ICheckableLegendItemData,
ILegendItemData,
ISupportInitialize,
IXtraSerializable,
ICheckableLegendItem,
ILegendItem
Related API Members
The following members accept/return Strip objects:
Remarks
The Strip class contains settings that define the functionality of strips within a chart control’s diagram.
Strip objects associated with a particular axis are contained within the axis’s Axis2D.Strips collection which is represented by an object of the StripCollection type. A particular Strip object can be accessed within the collection using either indexer notation (see the StripCollection.Item property) or by its name using the specific methods of the collection (see the StripCollection.GetStripByName method).
For more information, refer to Strips.
Example
This example demonstrates how strips can be created and customized at runtime.
Since strips reside in an appropriate axis collection, you should first cast your diagram object to the required diagram’s type. Then, you can access the collection via the Axis2D.Strips property.
// Cast the chart's diagram to the XYDiagram type, to access its axes.
XYDiagram diagram = (XYDiagram)chartControl1.Diagram;
// Create a strip with its maximum and minimum axis value defined.
diagram.AxisY.Strips.Add(new Strip("Strip 1", 5, 15));
// Customize the strip's behavior.
diagram.AxisY.Strips[0].Visible = true;
diagram.AxisY.Strips[0].ShowAxisLabel = true;
diagram.AxisY.Strips[0].AxisLabelText = "My Range";
diagram.AxisY.Strips[0].ShowInLegend = true;
diagram.AxisY.Strips[0].LegendText = "A Sample Strip";
// Customize the strip's appearance.
diagram.AxisY.Strips[0].Color = Color.CornflowerBlue;
diagram.AxisY.Strips[0].FillStyle.FillMode = FillMode.Empty;
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Strip class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.