Skip to main content
All docs
V24.2

BoxPlotDrawOptions Class

Stores appearance options used to draw the Box Plot series view.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v24.2.dll

Declaration

public class BoxPlotDrawOptions :
    DrawOptions

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;
    }

Inheritance

Object
DrawOptions
BoxPlotDrawOptions
See Also