home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Du Jour
/
SoftwareDuJour.iso
/
BUSINESS
/
DBASE
/
BARGRAF.ARC
/
GRAFEM.PRG
next >
Wrap
Text File
|
1987-03-30
|
2KB
|
70 lines
* Program..: Grafem.PRG
* Author...: Jon Wind
* Date.....: March 30, 1987
* Version..: dBASE III or III PLUS
* Note(s)..: This program generates a bar graph. It will graph
* any number less than 100, rounding to the nearest
* multiple of 5 (32 will round to 30, 38 to 40).
*
* The graph title and axes are drawn by the Grafname
* procedure, found in Grafproc.PRG. Color and row
* placement can be controlled.
*
* The graphing is done by the Bargraf procedure, found
* in Grafproc.PRG. Color, width, label, column and row
* placement can be controlled. Labels will be centered
* beneath the appropriate bar.
*
WAIT "Are you using dBASE III PLUS? (y/N) " TO db3p
SET TALK OFF
SET PROC TO grafproc
CLEA
IF UPPE(db3p)="Y"
*graframe --> frame bottom row,frame color,title row,graph title,title color
DO graframe WITH 19,"",4,"* dBASE III PLUS GRAPHING EXAMPLE *","w+"
ELSE
*set up memvars because REPLICATE command is not available
dbar=CHR(205)
full=CHR(219)
half=CHR(220)
DO WHIL LEN(dbar)<50
dbar=dbar+dbar
full=full+full
half=half+half
ENDD
*grafram2 --> frame bottom row,frame color,title row,graph title,title color
DO grafram2 WITH 19,"7",4,"* dBASE III PLUS GRAPHING EXAMPLE *","7+"
ENDI
IF UPPE(db3p)="Y"
*bargraf --> graph value,width,label row,label column,label name,color
DO bargraf WITH 100,6,20,16,"BAR #1","r"
DO bargraf WITH 28,6,20,30,"BAR #2","g"
DO bargraf WITH 63,6,20,44,"BAR #3","g+"
DO bargraf WITH 82,6,20,58,"BAR #4","r+"
*DO bargraf WITH 63,6,20,44,"TEST BAR NAME #3",""
*DO bargraf WITH 82,6,21,58,"TEST BAR NAME #4",""
ELSE
*bargraf2 --> graph value,width,label row,label column,label name,color
DO bargraf2 WITH 100,6,20,16,"BAR #1","r"
DO bargraf2 WITH 28,6,20,30,"BAR #2","g"
DO bargraf2 WITH 63,6,20,44,"BAR #3","g+"
DO bargraf2 WITH 82,6,20,58,"BAR #4","r+"
*DO bargraf2 WITH 63,6,20,44,"TEST BAR NAME #3","7"
*DO bargraf2 WITH 82,6,21,58,"TEST BAR NAME #4","7"
ENDI
CLOS PROC
SET TALK OFF
@23,0