Mean is the mathematical average for a set of numbers.
In a box and whisker chart, along with the dataset seriesname, the legend also shows the icons for mean, mean deviation, standard deviation, quartile deviation, and the outliers of every data plot. This is a concept exclusively applicable to the box and whisker chart. Each dataset is highlighted by different colors to easily differentiate between them and their icons. The legend icons are interactive; you can click the icons to show/hide the associated values on the chart.
In this section, you will be shown how you can:
Show/hide the mean icon in the legend
Customize the mean icon
Draw mean connectors
Connect null data
Showing/Hiding the Mean Icon
A box and whisker chart with the mean icon shown in the legend looks like this:
Given below is a brief description of the attribute used to show the mean deviation icon in the legend:
Attribute Name | Description |
---|---|
showMean |
It is used to specify whether the icon representing the mean of the dataset will be shown in the legend. Setting this attribute to 1 will show the icon, setting it to 0 (default) will hide it. This attribute can be used with the chart , dataset , and data objects. |
The data structure needed to show the mean icon in the legend is given below:
Customizing the Mean Icon
Given below is a brief description of the attributes used to customize the mean icon:
Attribute Name | Description |
---|---|
meanIconRadius |
It is used to specify the radius for the mean icon. |
meanIconSides |
It is used to specify the number of sides for the mean icon. |
meanIconShape |
It is used to specify the shape for the mean icon. This attribute can take one of the following two values: polygon or spoke . The default shape for a mean icon is the triangle - a polygon with three sides. |
meanIconColor |
It is used to specify the hex code of the color that will be used to render the mean icon. |
meanIconAlpha |
It is used to specify the transparency of the mean icon. This attribute takes values between 0 (transparent) and 100 (opaque). |
Drawing Mean Connectors
For multiple data plots, you can draw a line to connect the mean values of each dataplot.
A box and whisker chart rendered with mean connectors looks like this:
Given below is a brief description of the attribute used to draw mean connectors:
Attribute Name | Description |
---|---|
drawMeanConnector |
It is used to specify whether a connector will be drawn to connect the mean for multiple sets of data. Setting this attribute to 1 will draw the connector, setting it to 0 (default) will hide it.
The color that is used to render the mean deviation icon is also used to render the connecting line. |
The data structure needed to draw mean connectors is given below:
Connecting Null Data
If you use the showMean
attribute with the data
object and set it to 0
, the chart will not display the mean icon for that particular set of data. In this case, the missing mean deviation is considered as null data. Consequently, the mean connectors will skip this null data and draw a continuous connector.
A box and whisker chart with null data connected using mean connectors is given below:
In the above chart, a connector is drawn connecting the mean deviation icons of the first and the third data plots, skipping the second data plot.
Given below is a brief description of the attribute used to connect null data using mean connectors:
Attribute Name | Description |
---|---|
connectNullData |
It is used to specify whether the null values will be skipped and a continuous connector line will be drawn for multiple sets of data. Setting this attribute to 1 will ignore the null values and draw a continuous connector line, setting it to 0 will not ignore the null values.
This attribute is applicable for the mean icon and all the other deviation icons. |
The data structure needed to connect null data using mean connectors is given below:
There! You have now seen how you can configure the rendering of the mean on the box and whisker chart.