Box and Whisker Plot Control


Change Type of Plot

This page describes how to change the chart type of the box and whisker plot. The box and whisker control of the .Net Analytics is the following type:

The chart types for the box and whisker plot include the following methods:

  • WhiskerMaxMin
  • WhiskerWithFence

The first step is to include the necessary namespaces.

Change Chart Type

Below, we will add samples to a Box and Whisker chart (named bwPlot in the examples below), build the subgroups using subgroup size, and then change the chart type:

[Visual Basic]
' Create new samples
bwPlot.Samples.Add(10)
bwPlot.Samples.Add(12)
bwPlot.Samples.Add(13)
bwPlot.Samples.Add(15)
bwPlot.Samples.Add(9)
bwPlot.Samples.Add(8)

' Build the subgroup
bwPlot.SubgroupSize = 2
bwPlot.BuildSubgroupMethod = BuildSubgroupMethods.BuildBySubSize

' Use fences with the subgroups
bwPlot.ChartType = BoxWhiskerChartTypes.WhiskerWithFence

' Use max and min whiskers with the subgroups
bwPlot.ChartType = BoxWhiskerChartTypes.WhiskerMaxMin

[Visual C#]
// Create new samples
bwPlot.Samples.Add(10);
bwPlot.Samples.Add(12);
bwPlot.Samples.Add(13);
bwPlot.Samples.Add(15);
bwPlot.Samples.Add(9);
bwPlot.Samples.Add(8);

// Build the subgroup
bwPlot.SubgroupSize = 2;
bwPlot.BuildSubgroupMethod = BuildSubgroupMethods.BuildBySubSize;

// Use fences with the subgroups
bwPlot.ChartType = BoxWhiskerChartTypes.WhiskerWithFence;

// Use max and min whiskers with the subgroups
bwPlot.ChartType = BoxWhiskerChartTypes.WhiskerMaxMin;

After the samples have been added, and the subgroups built, the resulting chart should look similar to the following:

Box and Whisker plot with fences Box and Whisker plot with max and min whisker