Skip to main content
All docs
V25.1
  • BoxPlotSeriesView.MeanMarkerKind Property

    Gets or sets the Mean value’s marker kind.

    Namespace: DevExpress.XtraCharts

    Assembly: DevExpress.XtraCharts.v25.1.dll

    NuGet Package: DevExpress.Charts

    Declaration

    [XtraChartsLocalizableCategory(XtraChartsCategory.Appearance)]
    public MarkerKind MeanMarkerKind { get; set; }

    Property Value

    Type Description
    MarkerKind

    The Mean value’s marker kind.

    Available values:

    Show 11 items
    Name Description
    Square

    Specifies a square marker.

    MarkerKind.Square

    Diamond

    Specifies a diamond-shaped marker.

    MarkerKind.Diamond

    Triangle

    Specifies a triangular marker.

    MarkerKind.Triangle

    InvertedTriangle

    Specifies an inverted triangle marker.

    MarkerKind.InvertedTriangle

    Circle

    Specifies a circular marker.

    MarkerKind.Circle

    Plus

    Specifies a plus-shaped marker.

    MarkerKind.Plus

    Cross

    Specifies a cross-shaped marker.

    MarkerKind.Cross

    Star

    Specifies a star-shaped marker.

    MarkerKind.Star

    Pentagon

    Specifies a pentagonal marker.

    MarkerKind.Pentagon

    Hexagon

    Specifies a hexagonal marker.

    MarkerKind.Hexagon

    ThinCross

    Specifies a thin cross-shaped marker.

    MarkerKind.ThinCross

    Remarks

    Use the MeanMarkerSize property to change the Mean value’s marker size.

    Example

    This example shows how to create a Box Plot chart.

    using DevExpress.XtraCharts;
    using System;
    using System.Collections.Generic;
    using System.Drawing;
    using System.Windows.Forms;
    
    namespace BoxPlotChart {
        public partial class Form1 : Form {
            public Form1() {
                InitializeComponent();
            }
            private void Form1_Load(object sender, EventArgs e) {
                Series series = new Series("Box Plot", ViewType.BoxPlot);
                series.DataSource = DataPoint.GetDataPoints();
                series.SetBoxPlotDataMembersWithOutliers("Argument", "Min", "Quartile1", "Median", "Quartile3", "Max", "Mean", "Outliers");
                chartControl1.Series.Add(series);
    
                BoxPlotSeriesView view = series.View as BoxPlotSeriesView;
                view.EqualBoxWidth = true;
                view.Color = Color.CadetBlue;
                view.CapWidthPercentage = 50;
                view.MeanAndMedianColor = Color.Black;
                view.MeanMarkerKind = MarkerKind.ThinCross;
                view.MeanMarkerSize = 10;
                view.Border.Color = Color.Black;
                view.Border.Thickness = 1;
                view.Border.Visibility = DevExpress.Utils.DefaultBoolean.True;
    
                XYDiagram diagram = chartControl1.Diagram as XYDiagram;
                diagram.AxisX.Tickmarks.MinorVisible = false;
            }
        }
        public class DataPoint {
            public string Argument { get; set; }
            public double Min { get; set; } 
            public double Max { get; set; }
            public double Quartile1 { get; set; }
            public double Quartile3 { get; set; }
            public double Median { get; set; }
            public double Mean { get; set; }
            public double[] Outliers { get; set; }
            public DataPoint(string argument, double min, double max, double q1, double q3, double median, double mean, double[] outliers) {
                this.Argument = argument;
                this.Min = min;
                this.Max = max;
                this.Quartile1 = q1;
                this.Quartile3 = q3;
                this.Median = median;
                this.Mean = mean;
                this.Outliers = outliers;
            }
            public static List<DataPoint> GetDataPoints() {
                List<DataPoint> data = new List<DataPoint> {
                    new DataPoint("June", 46, 94, 64, 76, 70, 73, new double[]{ 30, 96.3, 99.56 }),
                    new DataPoint("July", 33, 121, 66, 88, 77, 75, new double[]{ 20, 22, 132.7 }),
                    new DataPoint("August", 10, 90, 40, 60, 50, 55, new double[]{ 4, 5, 95.4, 99.3, 109 })
                };
                return data;
            }
        }
    }
    
    See Also