public class NFComboChartApp extends Applet
This class supports the generation of combination barcharts, line charts and area filled charts. The combo chart accepts a set of bar data sets and line data sets, with most of the same display parameters found in the NFBarchartApp and NFXYChartApp applets. Bars may be displayed in either a stacked or grouped arrangement, similar to the barchart applet. Bars are always drawn first, with the line data sets drawn over them. The user may specify (x,y) coordinates for each line dataset, mapping those values to the screen using either the bottom or top and left or right axes. This allows the generation of charts in which the line set values are either consistent with the bar values (such as min/max line sets) or are best drawn using their own coordinate systems (such as a plot of average employee age vs. salary by age.)
The following standard parameters are supported by this chart:
Background
Header HeaderBox Footer FooterBox LeftTitle LeftTitleBox RightTitle RightTitleBox
DwellLabel DwellBox ActiveClicks ActiveLabels[1-50]
Legend LegendBox LegendItems
TopAxis (see description below) LeftAxis RightAxis (see description below) BottomAxis
Grid GridLine GridAxis
ColorTable
NoteSets NoteSets[1-20] NoteArrow NoteAxis NoteLabel NoteBox
Additionally, all of the Bar Chart parameters are supported by this chart, including:
GraphType GraphLayout
DataSets DataAxis DataSet[1-50]
BarLabels BarActiveLabels
StackLabel
The following parameters are specifically supported by this chart:
LineSets = (lineset1 tuple), (lineset2 tuple),...;
Defines a list of lineset tuples with the following attributes in each tuple:
"Name" - Name assigned to this data set SymColor - Symbol Color SymType - Symbol Type (CIRCLE, SQUARE, DIAMOND, CROSS, TRIANGLEDOWN, TRIANGLEUP) SymSize - Symbol Size (in pixels) SymStyle - Symbol Style (FILLED, OUTLINED) LineType - Line Type (SOLID, DOTTED, DASHED, DOTDASH) LineWidth - Line Width (in pixels) LineColor - Line Color FillColor - Fill Color
See NFXYChartApp for more details concerning line set attributes.
LineAxis = (XAxis1, YAxis1), (XAxis2, YAxis2), ...;
The XAxis and YAxis attributes define the specific axis to be used when mapping the X and Y values respectively for each data set defined. The XAxis attribute may be set to BOTTOM or TOP, while the YAxis may be set to LEFT or RIGHT.
LineSet[1-50] = (x1,y1), (x2,y2), ...;
Defines a list of (x,y) values for each line dataset defined by the LineSets parameter. If "null" is substituted for either or both of the x/y pair value's, the point will not be drawn.
LineLabels[1-50] = ("Label1", "URL1", "Target1"), ...;
Same as ActiveLabels[1-50] except that the labels correspond to the line datasets that have been defined.
TopAxis = (Axis Tuple);
RightAxis = (Axis Tuple);
By default, if either of these parameters is defined, this axis will be used to map the data values for all line sets, unless specified using the LineAxis parameter.
The following HTML segment defines a combo chart containing two sets of bars, displayed in groups, with three line data sets showing the min, max and average values. NOTE: The line and bar sets use the same LeftAxis and BottomAxis coordinates to line up the data values and bars. This is not always necessary or desired. In other cases, the TopAxis and RightAxis may be specified.
<applet code=NFComboChartApp.class width=400 height=400> <param name=NFParamScript value = '
Background = (white, NONE, 4);
Header = ("This is a Demo\nWith A 2-Line Header"); HeaderBox = (lightGray, RAISED, 5);
Legend = ("Legend", black, "TimesRoman", 18); LegendBox = (lightGray, SHADOW, 5);
GraphType = GROUP; Bar3DDepth = 5;
DataSets = ("Set #1", blue), ("Set #2", red); DataSet1 = 100, 200, 300, 400, 200; DataSet2 = 40, 30, 20, 10, 500;
LineSets = ("Min",yellow,CROSS,10,FILLED, SOLID,2,magenta,null), ("Avg",orange), ("Max",cyan);
LineSet1 = (0.2,40), (1.2,30), (2.2,20), (3.2,10), (3.8,200); LineSet2 = (0,70), (1,115), (2,155), (3,205), (4,350); LineSet3 = (-0.2,100), (0.8,200), (1.8,300), (2.8,400), (4.2,500);
BarLabels = "Mon", "Tues", "Wed", "Thur", "Fri";
BottomTics = ("ON", black, "TimesRoman", 14); LeftTics = ("ON", black, "Courier", 16);
Grid = (black, lightGray, black);
DwellLabel = ("", black, "TimesRoman", 16); DwellBox = (cyan, SHADOW, 5);
'> </applet>
Type | Name | Description | Default | ||||
public | NFComboChart | Underlying combo object | combo |