public class NFBoxchartApp extends Applet
This class supports the generation of Box Charts that are defined by <applet> parameters in an HTML file. A box chart (sometimes referred to as a "Box And Whiskers" chart) displays the following data:
minimum data point maximum data point 25th Percentile 50th Percentile 75th Percentile Any outliers
NOTE: This object determines outliers based on the following evaluation:
IF data point > 75th pctl + (1.5 * interquartile range) OR data point < 25th pctl - (1.5 * interquartile range) THEN data point is considered an outlier.
The following standard parameters are supported by this chart:
Background
Header HeaderBox Footer FooterBox LeftTitle LeftTitleBox RightTitle RightTitleBox
DwellLabel DwellBox ActiveClicks ActiveLabels[1-20]
Legend LegendBox LegendItems
TopAxis LeftAxis RightAxis BottomAxis
ColorTable
The following parameters are specifically supported by this chart:
DataType = type;
Defines the type of data in the data sets. The following types are supported:
RAW - Data is raw statistical data. Percentiles and other ancilliary information will be computed based on these values.
SUMMARY - Percentile information has already been computed. The data is formatted as follows: v1 = 25th Percentile v2 = 50th Percentile (median) v3 = 75th Percentile v4 = smallest (non outlier) v5 = biggest (non outlier) v6 ... = outliers (if any)
DataSets = (Name1, Color1), (Name2, Color2)...;
Defines a list of datasets with the given name and color.
If a color is not specified in the vector, then the previously specified color will be used. If the color is specified as "null", then a default color will be chosen from the color table. (See the ColorTable parameter.)
DataSet[1-20] = v1, v2, v3, v4, ...;
Defines a list of raw or summary values (see DataType above).
MedianColor = color;
Defines the color to be used when drawing the median. if not defined, the default color is white.
OutlierColor = color;
Defines the color to be used when drawing outliers. If not defined, it defaults to the same color as the data set.
Grid = (LineColor, BGColor, BorderColor);
Defines the grid to be displayed behind the boxes. If this parameter is not defined, no grid is displayed. If the BGColor is not defined, only grid lines are displayed.
The following HTML segment defines an Box chart containing three sets of data points, with the second connected by dotted lines.
<applet code=NFBoxchartApp.class width=400 height=200> <param name=NFParamScript value = '
Background = (lightGray, NONE, 4);
Header = ("Box Chart Demo", black, "TimesRoman", 18); HeaderBox = (white, SHADOW, 5);
BottomTics = ("ON", blue, "TimesRoman", 14);
Legend = ("Legend", black, "TimesRoman", 12); LegendBox = (lightGray, SHADOW, 5);
DwellLabel = ("", black, "TimesRoman", 20); DwellBox = (cyan, SHADOW, 5);
MedianColor = white; OutlierColor = white;
DataType = RAW;
DataSets = ("Set #1", darkCyan), ("Set #2", darkGreen), ("Set #3", darkYellow);
DataSet1 = 67, 45, 18, 82, 45, 54, 61, 55, 63, 47, 21, 31; DataSet2 = 32, 45, 5, 82, 45, 54, 61, 55, 63, 47, 21, 31; DataSet3 = 17, 22, 78, 34, 78, 56, 76, 98, 76, 77, 84, 82;
'> </applet>