Skip to main content
A newer version of this page is available. .
All docs
V21.1
.NET Framework 4.5.2+

HistogramSeriesOptions.BinType Property

Specifies how to calculate bin intervals for a histogram.

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v21.1.Core.dll

Declaration

HistogramBinType BinType { get; set; }

Property Value

Type Description
HistogramBinType

An enumeration member that specifies how to calculate histogram bins.

Property Paths

You can access this nested property as listed below:

Object Type Path to BinType
SeriesLayoutOptions
.Histogram .BinType

Remarks

The example below creates a histogram with a custom bin size. Set the BinType option to HistogramBinType.BinWidth and use the HistogramSeriesOptions.BinWidth property to define the desired width for histogram bins.

Histogram chart

// Create a histogram chart and specify its location.
Chart chart = worksheet.Charts.Add(ChartType.Histogram, worksheet["B2:B21"]);
chart.TopLeftCell = worksheet.Cells["D2"];
chart.BottomRightCell = worksheet.Cells["K18"];

// Specify histogram series options.
var options = chart.Series[0].LayoutOptions.Histogram;
options.BinType = HistogramBinType.BinWidth;
options.BinWidth = 24;
// Specify the gap width.
chart.Series[0].GapWidth = 10;

// Add the chart title.
chart.Title.Visible = true;
chart.Title.SetValue("Exam Score Distribution");
See Also