Loading
Configuring Mean Deviation
Mean deviation is the average of distances between each of the values and the mean. It gives us an idea of how spread out is the set of values from the center.
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 deviation icon in the legend
-
Customize the mean deviation icon
-
Draw mean deviation connectors
-
Connect null data
Showing/Hiding the Mean Deviation Icon
A box and whisker chart with the mean deviation icon shown in the legend box looks like thi:
Given below is a brief description of the attribute used to show the mean deviation icon in the legend:
Attribute Name | Description |
---|---|
|
It is used to specify whether the icon representing the mean deviation value of the dataset will be shown in the legend. Setting this attribute to Using this attribute with the |
The data structure needed to show the mean deviation icon in the legend is given below:
{
"chart": {
"caption": "Distribution of annual salaries",
"subcaption": "By Gender",
"xAxisName": "Pay Grades",
"YAxisName": "Salaries (In USD)",
"numberPrefix": "$",
"theme": "fint",
"usePlotGradientColor": "",
"showValues": "0",
"showMD": "1",
"MDIconSides": "8"
},
"categories": [
{
"category": [
{
"label": "Grade 1"
},
{
"label": "Grade 2"
},
{
"label": "Grade 3"
}
]
}
],
"dataset": [
{
"seriesname": "Male",
"lowerboxcolor": "#008ee4",
"upperboxcolor": "#6baa01",
"data": [
{
"value": "2400,2000,2500,2800,3500,4000, 3700, 3750, 3880, 5000,5500,7500,8000,8200, 8400, 8500, 8550, 8800, 8700, 9000, 14000"
},
{
"value": "7500,9000,12000,13000,14000,16500,17000, 18000, 19000, 19500"
},
{
"value": "15000,19000,25000,32000,50000,65000"
}
]
},
{
"seriesname": "Female",
"lowerboxcolor": "#e44a00",
"upperboxcolor": "#f8bd19",
"data": [
{
"value": "1900,2100,2300,2350,2400,2550,3000,3500,4000, 6000, 6500, 9000"
},
{
"value": "7000,8000,8300,8700,9500,11000,15000, 17000, 21000"
},
{
"value": "24000,32000,35000,37000,39000, 58000"
}
]
}
]
}
Customizing the Mean Deviation Icon
Given below is a brief description of the attributes used to customize the mean deviation icon:
Attribute Name | Description |
---|---|
|
It is used to specify the number of sides for the mean deviation icon. The default value of this attribute is |
|
It is used to specify the hex code of the color that will be used to render the mean deviation icon in the legend. |
|
It is used to specify the shape for the mean deviation icon. This attribute can take one of the following two values: |
|
It is used to specify the radius, in pixels, for the mean deviation icon. |
|
It is used to specify the transparency for the mean deviation icon. This attribute takes values between 0 (transparent) and 100 (opaque). |
Drawing Mean Deviation Connectors
For multiple data plots, you can draw a line to connect the mean deviation icons of each dataplot.
A box and whisker chart rendered with a mean deviation connector looks like this:
Given below is a brief description of the attribute used to draw mean deviation connectors for the box and whisker chart:
Attribute Name | Description |
---|---|
|
It is used to specify whether a connector will be drawn to connect the mean deviation for multiple sets of data.Setting this attribute to 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 a mean deviation connector is given below:
{
"chart": {
"caption": "Distribution of annual salaries",
"subcaption": "By Gender",
"xAxisName": "Pay Grades",
"YAxisName": "Salaries (In USD)",
"numberPrefix": "$",
"theme": "fint",
"showValues": "0",
"MDIconSides": "8",
"drawMDConnector": "1"
},
"categories": [
{
"category": [
{
"label": "Grade 1"
},
{
"label": "Grade 2"
},
{
"label": "Grade 3"
}
]
}
],
"dataset": [
{
"seriesname": "Male",
"lowerboxcolor": "#008ee4",
"upperboxcolor": "#6baa01",
"showMD": "1",
"data": [
{
"value": "2400,2000,2500,2800,3500,4000, 3700, 3750, 3880, 5000,5500,7500,8000,8200, 8400, 8500, 8550, 8800, 8700, 9000, 14000"
},
{
"value": "7500,9000,12000,13000,14000,16500,17000, 18000, 19000, 19500"
},
{
"value": "15000,19000,25000,32000,50000,65000"
}
]
},
{
"seriesname": "Female",
"lowerboxcolor": "#e44a00",
"upperboxcolor": "#f8bd19",
"data": [
{
"value": "1900,2100,2300,2350,2400,2550,3000,3500,4000, 6000, 6500, 9000"
},
{
"value": "7000,8000,8300,8700,9500,11000,15000, 17000, 21000"
},
{
"value": "24000,32000,35000,37000,39000, 58000"
}
]
}
]
}
Connecting Null data
If you use the showMD
attribute with the data
object and set it to 0
, the chart will not display the mean deviation icon for that particular set of data. In this case, the missing mean deviation is considered as null data. Consequently, the mean deviation connectors will skip this null data and draw a continuous connector.
A box and whisker chart with the mean deviation null data connected looks like this:
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 deviation connectors::
Attribute Name | Description |
---|---|
|
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 This attribute is applicable for the mean deviation icon and all the other deviation icons. |
The data structure needed to connect null data using mean deviation connectors is given below:
{
"chart": {
"caption": "Distribution of annual salaries",
"subcaption": "By Gender",
"xAxisName": "Pay Grades",
"YAxisName": "Salaries (In USD)",
"numberPrefix": "$",
"theme": "fint",
"showValues": "0",
"MDIconSides": "8",
"drawMDConnector": "1",
"connectNullData ": "1"
},
"categories": [
{
"category": [
{
"label": "Grade 1"
},
{
"label": "Grade 2"
},
{
"label": "Grade 3"
}
]
}
],
"dataset": [
{
"seriesname": "Male",
"lowerboxcolor": "#008ee4",
"upperboxcolor": "#6baa01",
"data": [
{
"value": "2400,2000,2500,2800,3500,4000, 3700, 3750, 3880, 5000,5500,7500,8000,8200, 8400, 8500, 8550, 8800, 8700, 9000, 14000",
"showMD": "1"
},
{
"value": "7500,9000,12000,13000,14000,16500,17000, 18000, 19000, 19500",
"showMD": "0"
},
{
"value": "15000,19000,25000,32000,50000,65000",
"showMD": "1"
}
]
},
{
"seriesname": "Female",
"lowerboxcolor": "#e44a00",
"upperboxcolor": "#f8bd19",
"data": [
{
"value": "1900,2100,2300,2350,2400,2550,3000,3500,4000, 6000, 6500, 9000"
},
{
"value": "7000,8000,8300,8700,9500,11000,15000, 17000, 21000"
},
{
"value": "24000,32000,35000,37000,39000, 58000"
}
]
}
]
}
There! You have now seen how you can configure mean deviation for the box and whisker chart.