Box Plot
Box Plot charts are categorical charts that graphically render groups of numerical data through their quartiles. Also known as box and whiskers charts, they display a data distribution summary with six statistical indicators—lower value, first quartile, median, mean, third quartile, and upper value—plus outliers for each series.
Binding to Data
You can bind the Box Plot chart series to an array through the data property in two formats:
-
Binding to arrays—Use arrays of
[lower, q1, median, q3, upper]values where each element represents the statistical distribution values.tspublic data: [number, number, number, number, number][] = [ [10, 15, 20, 25, 30], [12, 18, 22, 28, 32], [8, 13, 19, 23, 27] ]; -
Binding to objects—Use an array of objects with custom properties.
tspublic data: Array<{ category: string; lower: number; q1: number; median: number; q3: number; upper: number; mean?: number; outliers?: number[]; }> = [ { category: 'Q1', lower: 10, q1: 15, median: 20, q3: 25, upper: 30, mean: 20.5, outliers: [5, 35] }, { category: 'Q2', lower: 12, q1: 18, median: 22, q3: 28, upper: 32 } ];When binding to objects, specify which properties contain the data through the following field mappings:
Property Data type Required Description lowerFieldstringYes* The property name that contains the lower value with numbervalues (*required when binding to objects).categoryFieldstringNo The property name that contains the category with string,date, ornumbervalues.q1FieldstringYes* The property name that contains the first quartile value with numbervalues (*required when binding to objects).medianFieldstringYes* The property name that contains the median value with numbervalues (*required when binding to objects).q3FieldstringYes* The property name that contains the third quartile value with numbervalues (*required when binding to objects).upperFieldstringYes* The property name that contains the upper value with numbervalues (*required when binding to objects).meanFieldstringNo The property name that contains the mean value with numbervalues.outliersFieldstringNo The property name that contains the outliers array with number[]values.
The following example demonstrates how to bind the Box Plot chart series to data using object models.
Vertical Box Plot
The Box Plot chart type also supports a vertical orientation by setting the series type to verticalBoxPlot. When you use verticalBoxPlot, the chart rotates the box plots 90 degrees, displaying categories along the vertical axis and values along the horizontal axis. This orientation can be useful when you have long category names or when you want to emphasize the horizontal distribution of values.
The vertical box plot accepts the same data structure and field mappings as the standard box plot. All customization options for mean, median, outliers, and whiskers are also available.
The following example demonstrates how to create a vertical Box Plot chart.
Customizing the Appearance
The Box Plot chart provides configuration options for customizing the visual appearance of its statistical elements:
colorandborder—Control the box fill color and border styling (color, width, dashType).mean—Customize the mean line appearance, which is dashed by default (color, width, dashType).median—Configure the median line that divides the box (color, width, dashType).whiskers—Style the lines extending to minimum and maximum values (color, width, dashType).outliers—Customize the markers for data points outside the whisker range (background, border, size, type).
The following example demonstrates how to customize the appearance of the elements of the Box Plot chart.
Support and Learning Resources
- Box Plot Chart Homepage
- Getting Started with the Kendo UI for Angular Chart
- API Reference of the Charts
- Area Charts
- Bar Charts
- Bullet Charts
- Line Charts
- Radar Charts
- RangeArea Charts
- RangeBar Charts
- Waterfall Charts
- Getting Started with Kendo UI for Angular (Online Guide)
- Getting Started with Kendo UI for Angular (Video Tutorial)
- Video Courses
- Chart Forum
- Before You Start: All Things Angular (Telerik Blog Post)
- Knowledge Base