Skip to main content
All docs
V23.2

BoxPlotDrawOptions.Border Property

Returns border settings for Box Plot series points.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v23.2.dll

NuGet Package: DevExpress.Charts

Declaration

public RectangularBorder Border { get; }

Property Value

Type Description
RectangularBorder

An object that stores border options.

Example

This example shows how to customize the appearance of specific Box Plot series based on a given condition when the chart control renders its series.

In the ChartControl.CustomDrawSeries (WebChartControl.CustomDrawSeries) event handler, use the Series and SeriesDrawOptions properties to access a series and its drawing options.

using DevExpress.XtraCharts;
using System;
using System.Drawing;
using System.Windows.Forms;
//...
    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);

        chartControl1.CustomDrawSeries += ChartControl1_CustomDrawSeries;
    }

    private void ChartControl1_CustomDrawSeries(object sender, CustomDrawSeriesEventArgs e) {
        // Find all Box Plot series and define their color.
        if (e.Series.View is BoxPlotSeriesView)
            e.SeriesDrawOptions.Color = Color.Orange;

        // Find a series by its name and define its border color.
        if (e.Series.Name == "Box Plot")
            ((BoxPlotDrawOptions)e.SeriesDrawOptions).Border.Color = Color.Black;

        // Find all Box Plot series by the type of their DrawOptions
        // and specify the series fill style.
        if (e.SeriesDrawOptions.GetType() == typeof(BoxPlotDrawOptions))
            ((BoxPlotDrawOptions)e.SeriesDrawOptions).FillStyle.FillMode = FillMode.Gradient;
    }
See Also