TableGraph

TableGraph

Superclass
ApplicationModel

Subclasses
QueryGraph

Referenced By
ReportModel, TableGraph, PeriodCostsValues

This class displays a graph given a two-dimensional collection and the labels.  The graph
is essentially three-dimensional, consisting of the labels (mapped to the columns of the
table), the legend (mapped to the rows of the table), and the amount of each table field.

It has different ways of displaying the graphs, it can be either vertically or
horizontally viewed, the legend placement can be specified, and the data placement and bar
widths can also be changed.
In addition, the labels and the legend can be swapped (transposing), and the running sum or
the running average of the data can also be viewed.

Some extra parameters can be specified:
1.  The order in which the columns and rows will be shown, handled by rowLabelIndices and
columnIndices, which are ordered collections.  They specify the index of the 2 D
collection which will be displayed at the specific row or column index.  For example, if
the row index is #(3 10 2), then the 3rd row will be displayed as the 1st row, the 10th as
the 2nd, and the 2nd as the 3rd.  The default is to display in the same order.

2.  Also it is possible to limit the display of the collections to a subset.  Then only
the first specified columns are displayed.  This is done by specifying the size of the
collection to display.  Specify this in tableSize.  Combined with the first option, any
rectangular subset in a collection can be displayed.  The default is to display the entire
2 D collection.

3.  The format of the data can also be specified.  The data formats are #general,
#quantity, #comma, #float, and #percent.  It is assumed that there are three different
data to be displayed, percentages, quantity, and dollars.  The default is to display
dollars (dataFormat = #general), divided by 1 (resultDivision = 1), with the unit as $
(unitFormat = '$').  Any of these can be changed through the mutator methods.
It is not necessary, however, to change all three methods.  If you want to change to
percentage (dataFormat = #percent), then the unitFormat automatically changes to '%'.  If
you change to quantity, the unitFormat changes to 'Amount'.

4.  The table interface displaying the graphs in numbers can be displayed.  This is the
default, but it can be turned off.

The graph is able to update itself when the table changes.

Instance Variables
data <ValueHolder of: List of List> The actual data to be displayed.
table <2D ordered collection> The base data from which the displayed data will be calculated.
options <ValueHolder of Spec Array> The specification for controlling the bar width and the data location.
dataFormat <Symbol> The format of the data to be displayed.
unitFormat <String> The string to be displayed as the y axis unit.
tableSize <Point> The number of items in the collection to be displayed.
isTransposed <Boolean> True if the data should be transposed (row becomes column and column becomes row).
wrapper <TableGraphWrapper> The wrapper that displays the graph.
rowLabels <SequenceableCollection> The names of the row labels.
origRowLabels <SequenceableCollection> The original labels.
rowLabelIndices <SequenceableCollection> The mapping from the table to the data in the order of the row items.
legendType <Number> The placement indication of the legend.
columns <SequenceableCollection> The names of the column labels (legend if not transposed).
origColumns <SequenceableCollection> The names of the original column labels.
columnIndices <SequenceableCollection> The mapping from the table to the data in the order of the column items.
dependencyWith <Object> The object that would trigger an update if changed.
dependencyMethod <Symbol> The method that will supply the new data after an update.
labelsMethod <Symbol> The method that will supply the new labels after an update.
showTableInterface <Boolean> True if the table interface at the bottom should be shown.
resultDivision <Number> The number to divide the data by. The default is 1. Developed By Jee Ku (jku@cat.ncsa.uiuc.edu) and Joseph W. Yoder (yoder@cs.uiuc.edu)

Potential problems with this comment:
	Instance variable commented but not in class definition - 
		table
	Instance variable not commented - 
		isColFixedWidth, chartTypeSymbol, defaultGraphType, state, 
		chart, twoDCollection, tableInterface
	Variable has invalid type - 
		#('table' '2D ordered collection'), #('options' 'ValueHolder of Spec Array'), 
		#('wrapper' 'TableGraphWrapper')