Back to Devexpress

HistogramSeriesOptions.OverflowType Property

officefileapi-devexpress-dot-spreadsheet-dot-charts-dot-histogramseriesoptions-1fe6bea8.md

latest4.0 KB
Original Source

HistogramSeriesOptions.OverflowType Property

Returns or specifies how to create the overflow bin for a histogram chart.

Namespace : DevExpress.Spreadsheet.Charts

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
HistogramOverflowType OverflowType { get; set; }
vb
Property OverflowType As HistogramOverflowType

Property Value

TypeDescription
HistogramOverflowType

An enumeration member that specifies whether to display the overflow bin and how to calculate a threshold for this bin.

|

Available values:

NameDescription
None

The chart does not include the overflow (or underflow) bin.

| | Automatic |

A threshold value for the overflow (or underflow) bin is calculated automatically.

| | Fixed |

The OverflowValue (or UnderflowValue) property specifies a threshold value for the overflow (or underflow) bin.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to OverflowType
SeriesLayoutOptions

.Histogram .OverflowType

|

Remarks

The example below demonstrates how to create a histogram chart and display the overflow bin for all points that are above a value defined by the HistogramSeriesOptions.OverflowValue property.

csharp
// 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 = 20;
// Create the overflow bin
// for all values that are above 90.
options.OverflowType = HistogramOverflowType.Fixed;
options.OverflowValue = 90;

// Specify the gap width.
chart.Series[0].GapWidth = 10;

// Add the chart title.
chart.Title.Visible = true;
chart.Title.SetValue("Exam Score Distribution");
vb
' Create a histogram chart and specify its location.
Dim chart As Chart = worksheet.Charts.Add(ChartType.Histogram, worksheet("B2:B21"))
chart.TopLeftCell = worksheet.Cells("D2")
chart.BottomRightCell = worksheet.Cells("K18")

' Specify histogram series options.
Dim options As HistogramSeriesOptions = chart.Series(0).LayoutOptions.Histogram
options.BinType = HistogramBinType.BinWidth
options.BinWidth = 20
' Create the overflow bin
' for all values that are above 90.
options.OverflowType = HistogramOverflowType.Fixed
options.OverflowValue = 90

' 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

HistogramSeriesOptions Interface

HistogramSeriesOptions Members

DevExpress.Spreadsheet.Charts Namespace