home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
jk_graph.zip
/
GRAPH.DOC
< prev
next >
Wrap
Text File
|
1988-09-08
|
10KB
|
196 lines
GRAPH
Version 0.5
Copyright (C) 1988, LINEAR Software Design, Jim Killeen. All Rights Reserved.
-----------------------------------------------------------------------------
**** NOTE: This program requires an EGA graphics adapter. ****
***************************************************************************
| To get right to the heart of the matter and see if you're interested |
| in continuing further, at the DOS prompt type: DISPLAY |
| To EXIT each graph after it is displayed press any key. |
| |
| DISPLAY is a batch file that shows the different graph formats using |
| different dBASE files. | *
***************************************************************************
First, the bad news: this program currently will run ONLY on PC's
with an EGA. In addition, to print a graph, you must have an Epson or
Epson-compatible printer. While these limitations are expected to be
addressed in future releases (note the version number above), I am
currently providing this release to test the waters so to speak, and
to get input on features that people would like. This IS a beta version
and I am NOT asking for any money. Right now I am hoping to repay many
of the folks on the BOSS BBS for all the help I have received there
(though this is small payment). I DO ask however, that this not be
uploaded to other BBS's, at least not at this time. The reason for this
is that I currently do not have the time needed to provide effective
support (beyond questions asked on the BOSS in the Clipper area), and
given the limited documentation, it WILL require support. With those
Caveats in mind, there ARE some good points.
The good news: GRAPH allows an individual to graphically display
numeric data stored in a dbase file, in BAR and LINE graph formats. The
data is automatically scaled to provide appropriate representation. You
have the options of horizontal or vertical grids, or both. Colors can be
selected for the border, the BARS or LINES, the titles, the numbers and
descriptions, and the grids. Three "titles" are allowed, two at the top
one at the bottom, and they are automatically centered. Descriptions of
the elements are centered below each item (any excess is truncated).
When GRAPH is executed it expects the name of two files on the command
line. (I currently run GRAPH from most of my Clipper applications by
using the "RUN" or "!" comand). The first is a dbase file containing the
settings: the type of graph (BAR, LINE), colors , status of the grid
(off, horizontal, vertical, both) etc. The second file contains the actual
data to create the graph from. This second file consists of two fields:
one for the numeric data, and one for the description. While the names of
the FIELDS in the dBASE file structures CAN be modified, their length can
NOT. Currently, the BAR graph allows up to 12 records (you can append more,
but only twelve will be displayed), and the line graph allows up to 31
records. While this arrangement is limiting, it should provide ample use
for most purposes, and it too is expected to be revised. Right now I
prefer to use only two settings files, one I have set up for BAR graphs,
the other for LINE graphs. Prior to using either I REPLACE the approp-
riate title strings with what I need and then send along the proper data
file.
The File Structures and what they mean:
--------------------------------------------------------------------------
The Settings File:
The first parameter passed to GRAPH from the command line is the
name of the settings file. Below is the dBASE structure for this file:
**********************************************
Field Field Name Type Width Dec
1 TOP_TITLE1 Character 60
2 TOP_TITLE2 Character 60
3 BOTT_TITLE Character 60
4 TITLE_CLR Numeric 1
5 SCALE_CLR Numeric 1
6 BORDER_CLR Numeric 1
7 BAR_CLR Numeric 1
8 SHADOW_CLR Numeric 1
9 GRID Numeric 1
10 GRAPH_TYPE Numeric 1
** Total ** 188
***********************************************
Remember, the Field Name can be changed to anything you might prefer,
but the Width must NOT be altered. Here are the descriptions of each
field:
Field 1: This represents the first title at the very top of the screen.
60 Characters should be more than enough for anyone who is not
extremely long-winded. The field is centered on screen.
Field 2: This is positioned on the line directly below Field 1.
Field 3: Positioned at the very bottom of the screen, and centered.
Field 4: Represents the color of all the titles (Fields 1,2 and 3).
(See valid color codes below).
Field 5: Represents the color of the numbers along the 'Y' Scale, as well
as the descriptions of each element along the bottom border.
(See valid color codes below).
Field 6: Represents the color of the border of the graph.
(See valid color codes below).
Field 7: Represents the color of the BARS or the LINES, depending on
which graph type has been indicated.
(See valid color codes below).
Field 8: Represents the "depth" of the BARS, that provides the extra
dimension.
(See valid color codes below).
Field 9: This indicates the following:
A Value of 0: No grid is to be used
" 1: Horizontal Grid only
" 2: Vertical Grid only
" 3: Both Horizontal and Vertical Grids
Field 10: Indicates the type of graph desired:
A Value of 0: Line Graph
" 1: Bar Graph
" 2: NOTE: I probably shouldn't have mentioned this one
but someone is gonna' come across it. I am currently working on providing
pie charts. This is the INCOMPLETE and NON-WORKING code for pie-charts.
If you must use this code bear in mind that when the pie is displayed
you must step through the presentation of each element by pressing
the return key. (Remember the words "Beta Version").
Valid Color Codes:
1: Blue
2: Green
3: Cyan
4: Red
5: Purple
6: Brown
7: White
The Data File:
The second parameter passed to GRAPH from the command line is the
name of the data file. Below is the dBASE structure for this file:
**********************************************
Field Field Name Type Width Dec
1 DESCRIPT Character 20
2 AMT_1 Numeric 10
** Total ** 31
**********************************************
Again, the Field Name can be changed to anything you might prefer,
but the Width must NOT be altered. Here are the descriptions of each
field:
Field 1: Description, can contain up to 20 characters. Not all of these
characters will necessarily be displayed. GRAPH truncates any
characters that will not fit in the space needed below each item.
If you are only displaying three or four records, odds are that
you will see all the characters. It is when more elements are
being displayed that this area becomes more crowded, and the
descriptions must be adjusted to accomodate the space allotted.
These decriptions are centered below each BAR or LINE.
Field 2: This field contains the numeric value to be scaled. GRAPH looks
at the numeric elements of all the records and decides how to
scale them accordingly. It determines if the values should be
represented directly, or in thousands or millions, and places a
note to that effect at the top of the 'Y' Scale. When using
BAR graphs, if one element is disproportionate to the others,
GRAPH displays the other majority of elements in relation to
each other, and shows the larger item at the full height of the
graph. In addition, the exact amount of that item is displayed
next to it's BAR. For example, given the 5 elements 120, 150,
145, 9800, 170: The top scale would be 200, with the 9800 item
shown as the full height of the graph.
Printing Graphs:
----------------
Graphs can currently be printed on an Epson or Epson-compatible printer.
This is accomplished by pressing the letter 'P' while looking at the
graph on your screen. The most severe limitation here is that the graph
can be printed in one size and with one orientation. Support for additional
printers and optional graph sizes are both on the "things to do" list.
I hope the above information has been helpful enough but once again,
I have limited time available (doesn't everybody), but wanted to provide
something in the meantime until I can REALLY make this baby sing.
It is very important to me to hear your thoughts on this program, if you
would please send me mail on the BOSS.BBS in the Clipper area, I will try
to answer what questions I can. Enjoy!
BOSS.BBS
(201) 568-7293
Jim Killeen