ASP.NET MVC Box and Whisker chart is used to visualize a group of numerical data through their quartiles. It is also referred as box plot. Box plots may also have lines extending vertically from the boxes (whiskers) indicating variability outside the upper and lower quartiles.
Supports different types of rendering mode such us exclusive, inclusive, and normal.
Represent the values that are lying beyond the minimum and maximum values of the data point with outlier. Usually represented with a circle.
Show mean allows you to enable or disable the average value of box plot.
Use multiple axes to plot different data sets that widely vary from one other.
Allows you to plot multiple series in a single chart to compare different data sets. Enabling legend and tooltip gives more information about the individual series.
Data labels display information about data points. Add a template to display data labels with HTML elements such as images, DIV, and spans for more informative data labels. You can rotate a data label by its given angle.
Customize the color, thickness, and border of the box plot with in APIs to make it visually unique.
Easily get started with ASP.NET MVC Box and Whisker Chart by using a few lines of HTML and TS code, as demonstrated below. Also explore our ASP.NET MVC Box and Whisker Chart Example that shows how to render and configure the chart.
@Html.EJS().Chart("container").Series(series =>
{
series.Type(Syncfusion.EJ2.Charts.ChartSeriesType.BoxAndWhisker).
Name("Department").
DataSource(ViewBag.dataSource).
XName("xValue").
YName("yValue").Add();
}).PrimaryXAxis(px => px.ValueType(Syncfusion.EJ2.Charts.ValueType.Category)).Render();
public class HomeController : Controller
{
public ActionResult Index()
{
Double[] y1 = { 22, 22, 23, 25, 25, 25, 26, 27, 27, 28, 28, 29, 30, 32, 34, 32, 34, 36, 35, 38 };
Double[] y2 = { 22, 33, 23, 25, 26, 28, 29, 30, 34, 33, 32, 31, 50 };
Double[] y3 = { 22, 24, 25, 30, 32, 34, 36, 38, 39, 41, 35, 36, 40, 56 };
Double[] y4 = { 26, 27, 28, 30, 32, 34, 35, 37, 35, 37, 45 };
Double[] y5 = { 26, 27, 29, 32, 34, 35, 36, 37, 38, 39, 41, 43, 58 };
Double[] y6 = { 27, 26, 28, 29, 29, 29, 32, 35, 32, 38, 53 };
Double[] y7 = { 21, 23, 24, 25, 26, 27, 28, 30, 34, 36, 38 };
Double[] y8 = { 26, 28, 29, 30, 32, 33, 35, 36, 52 };
Double[] y9 = { 28, 29, 30, 31, 32, 34, 35, 36 };
List<BoxAndWhiskerChartData> chartData = new List<BoxAndWhiskerChartData>
{
new BoxAndWhiskerChartData { xValue = "Development", yValue = y1 },
new BoxAndWhiskerChartData { xValue = "Testing", yValue = y2},
new BoxAndWhiskerChartData { xValue = "HR", yValue = y3 },
new BoxAndWhiskerChartData { xValue = "Finance", yValue = y4 },
new BoxAndWhiskerChartData { xValue = "R&D", yValue = y5 },
new BoxAndWhiskerChartData { xValue = "Sales", yValue = y6 },
new BoxAndWhiskerChartData { xValue = "Inventory", yValue = y7 },
new BoxAndWhiskerChartData { xValue = "Graphics", yValue = y8 },
new BoxAndWhiskerChartData { xValue = "Training", yValue = y9 },
};
ViewBag.dataSource = chartData;
return View();
}
}
public class BoxAndWhiskerChartData
{
public string xValue;
public double[] yValue;
}
Box and Whisker Chart User Guide
Learn the available options to customize ASP.NET MVC Box and Whisker chart.
Box and Whisker Chart API Reference
Explore the ASP.NET MVC Box and Whisker chart APIs.