JcGraph (Demo v0.903 on FredFish 671) Copyright 1992, Jean-Christophe Clément Internet:clemj00@dmi.usherb.ca Amiga, AmigaDos, WorkBench are a trademark of Commodore-Amiga Inc. PostScript is a trademark of Adobe system corp. Professionnal Page is a trademark of Gold Disk Inc. PageStream is a trademark of Soft-Logik corp. Saxon Publisher is a trademark of Saxon Industries Inc. AegisDraw2000 is a trademark of Oxxi/Aegis Inc. File requester: Copyright 1990 Khalid Aldosery. HyperText system by Dominic Giampaolo. Note to the purists: English is my second language. WARNING: This software is not public-domain and thus, cannot be copied without the written permission from is author. Beeing a registered user by sending any amount of money doesn't gives any distribution right. But, a demo version which is available on request and can be freely redistributed but should keep its integrity. This demo is identified as is and all other copies are illegal. DISCLAIMER OF WARRANTY THIS SOFTWARE AND MANUAL FILE ARE OFFERED "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OR MERCHANTABILITY. ANY STATMENTS MADE ABOUT THE USES OF THIS SOFTWARE DO NOT CONSTITUTE WARRANTIES AND SHALL NOT BE RELIED ON BY THE BUYER IN DECIDING TO PURCHASE THIS PROGRAM. THIS PROGRAM IS SOLD WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES WHATSOEVER. BECAUSE OF THE DIVERSITY OF CONDITIONS AND HARDWARE UNDER WHICH THIS PROGRAM MAY BE USED, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED. THE USER IS ADVISED TO TEST THE PROGRAM THOROUGHLY BEFORE RELYING ON IT. THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM. ANY LIABILITY OF SELLER/MANUFACTURER WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF PURCHASE PRICE. Registration: Send 40$ CANADIAN dollars (mail order or check is fine) to: Jean-Christophe Clement 921 rang 3 , St-Simon Quebec,CANADA J0H-1Y0 (resident of Country other than Canada and USA should add 7$ for delivery) You will receive by mail a disk containing the software (JcGraph). I would like to have some information on your working environment too. Note that your money envoice will garantee that the (1) next JcGraph upgrade will be freely sent to you (if there is such an upgrade): 1. Wich AmigaDOS version are you using ? a. If version < 2.0, are you planning to upgrade soon ? 2. What other major software are you using with your Amiga ? a. If your using a spreadsheet, I would like to have it's name. 3. (To your discretion) How old are you ? 4. Are you planning to use JcGraph on a personnal or professionnal basis ? 5. Wich model of Amiga are you using ? 6. What peripheral(s) do you have ? Table of content: ----------------- 0.Introduction. 1.Required configuration, Hardware and Software. 2.JcGraph's installation. 3.Step by step example of a graph's creation. 4.Menu options summary. 5.Control panel window. 6.File format: Input. 7.File format: Output. 8.Graph's modification. 9.Keyboard equivalent. 10.Palette requester. 11.TOOLTYPE and command line options. 12.ARexx interface. 13.Graph type file format. 14.The future of JcGraph. 15.JcGraph history. 0.Introduction: --------------- a.What is JcGraph ?. Specialised in business graph generation, JcGraph will output your data as Pie, line, bar, stack charts,(etc...more) in two or three dimension. You will then be able to rotate the resulting graph in X,Y,Z axes and output them to: EPS,Geo 3D, AegisDraw2000 or IFF ILBM. b.Why I have created JcGraph ? Because, after having tried some commercial software that were "supposed" to produce professionnal quality business graphs, I found that none were up to what is available for Macintosh or IBM PC compatibles. Considering the Amiga reputation as a "Multimedia" computer, it was time for a change. c.JcGraph's philosophy. The first goal of Jcgraph was to produce highest quality business graphics with the greatest visual impact with the least effort possible. So, I asked myself: "What is the single most difficult thing to do when someone is making a business graphic without any specific tool other than a paint program ?". The answer is quite simple: "The main graphic itself!". I mean, once the main graph is designed, the process of adding title, annotation, graduated background, etc... is trivial. JcGraph reflects this thinking; it will help you create a great looking graphic and the flexibility of it's export modules will let you add all the fancy details in other specialised software. d. Style guide compliance. Well, I tried as much as possible to stick to the Style guide book, if you take into account the limited ressources I had to invest in JcGraph. 1.Required configuration, Hardware and Software: ------------------------------------------------ Minimal: Any Amiga (more than one is not a necessity :-). 1meg RAM. WorkBench 1.3. 1 floppy disk. Suggested: Accelerated Amiga. 1.5+ meg RAM. WorkBench 2.0+. Hard-Disk. JcGraph has been tested and judged fully functionnal under these system configurations: -Amiga 500, 1 floppy, 1 meg RAM, WB 1.3, 68000. -Amiga 2000HD, 52 Megs HD, 3 megs RAM, WB 2.0, 68000. -Amiga 3000/16, 50 Megs HD, 2 megs RAM, WB 2.0, 68030/16Mhz 2.JcGraph's installation: ------------------------- A-Logical assigns: ------------------ For example: If you copy JcGraph in "Work:MyJcGraph", add this line to the file "s:startup-sequence": "assign JcGraph: Work:MyJcGraph". B-Directory and files required (After having done A): ----------------------------------------------------- libs:icon.library :On WB 1.3 (in ROM under 2.0). libs:kd_freq.library :File-requester Library. (For <2.0 user) libs:IffParse.library ;Library used for IFF ILBM . JcGraph:Graphtype :Contain all graph types. JcGraph:Template :Contain all Templates. JcGraph:HelpFile :Contain all help files. JcGraph:Rexx :Contain all Rexx scripts. JcGraph:HelpFile/ht :On-line Help engine. JcGraph:JcGraph :Main program. If you haven't done so yet, go to jcgraph:libs directory and type (in a shell) "copy #?.library libs:". Everything should be functionnal from now. Note that I CANNOT distribute 'IffParse.library' that comes with WB 2.0, so, you should manage to get it somewhere else. 3.Step by step example of a graph's creation: --------------------------------------------- We will produce a graph made of 3 rows of 3 planes each and output it as AegisDraw2000. The first step is data creation. To do so, use your favorite text editor. It is important that it should not produce a file containing special control characters that would not be recognized by JcGraph (stay ASCII international). After your text editor is loaded, start by entering "1002" (without the "" delimiters). This sequence help JcGraph identify the file type, to be sure that it is really compatible. Note that all value should be comma-separated. Next, enter the number of column that your file will contain, "3" in our example. Do the same thing for the number of line. Follows a number which will set the space between each cotation in the scale on the side of the graph; for example, if your data range from 0 to 100 and you specify 25, the cotation scale will output "0","25","50","75","100". This number use the same value unit as the data itself. The next number (floating point), is the one by which every cotation value will be multiplied ; for example, if you enter "1.24", each cotation of the scale will be muliplied by 1.24. This permits to access floating point value without changing the data itself. Note that only 3 decimals positions will be kept for now and that a value of 0 will result in an integer form (ie no decimal point). The next step is the value entry. As we chose to produce a 3 by 3 data file, there will be 9 consecutive values (they can be on the same line but should always be comma-separated). The 3 next value are text strings that will identify your columns (they should always be filled). Same procedure for each line. Note that the orientation is always the same. Rows represents variation and lines are diferent products type. Here is the resulting data file from the example: 1002, 3,3,10,0, 10,20,30, 50,60,60, 15,32,17, Jan,Fev,Mar, Gaz,Oil,Fer, Save this result as "test3X3.asc". The next major step is to load this data file in JcGraph. First, run JcGraph. Note that once JcGraph is started, there can be a 3 to 5 second break (more with default ARexx script) before you see anything happen, this is normal. Now, choose "Open..." from the project menu (Amiga+O) IMPORTANT: JcGraph accepts command from the interface window only. So, every time you want to perform an operation, you should select it (if not already selected). It is also worth to mention that when there is no data loaded in JcGraph, the interface's title bar will display "No Data". A file requester will pop up asking "Choose an ASCII data file". It's utilisation is not described here for brievty but can get extended help by pressing HELP or SHIFT-F1 when it is active. Find et select your file "test3X3.asc" and select "Open" from the lower left corner of the file requester's window. The mouse pointer will change for a small clock until your data file is openned. This should'nt be long. The title bar should now display "test3X3.asc". The window titled "Preview" gives an approximation of what the final graph will look like, in this case, data is graphed as 3D blocks. For example purpose, we will choose another type of graphic. Choose "Load..." (Amiga+T) from the "GraphType" menu. Another file requester should appear. If JcGraph is correctly installed, a number of file ending with ".grf" extension should be listed in the window. You can now choose the type of graph that best suit your needs. For the example, choose "3D_BrokenPlanes.grf" then "Load...". After a short period of time, you should see the new graph type reflected in the Preview window. Note that the wireframe representation of the preview window is used for real-time manipulation, the final output is filled with colors. The actual three-dimensionnal perspective doesn't do justice to the 3D effect, so we will rotate the graph using the interface window's gadgets. There is two main section that divide the interface window: 1. To the left, there is two gadget labelled "Undo" and "Render". We will discuss their respective function later. 2. To the right, there is 4 lines of gadgets. These ones control rotation values and perspective of the graph. Line 1: Rotation around X. Line 2: Rotation around Y. Line 3: Rotation around Z. Line 4: Perspective control. For example purpose, we will not discuss these any further (they are described in section 5). For now, just select the first gadget from the top (the rectangular one, with a "0" in it) and replace the "0" by "-30". Press RETURN. Do the same with the next gadget, but this time, replace "0" by "30". You will immediatly see the change in the preview window. The effect is a lot more dynamic. Now, if you want to look at the final result, select the "Render" gadget from the interface window. The mouse pointer will change for a longer period of time. After a while, the pointer should get back to normal and you should see the final result in the Output window. If it is obscured by another window, just bring it to the front (but remember to click back in the interface window in order to do any other manipulation on the graph). From here, there could be some constatation: 1. It's nice (I hope so :-) 2. It's too small. 3. You don't like the colors. We will solve all the problems, one at a time. 1. It's nice: That's not really a problem. 2. It's too small: Grab the sizing gadget (the one at the lower right of the Output window) and drag it to the desired size. Now, re-press "Render" and "voila!". 3. You don't like the colors: It is the next step. Color choice: Choose the "Color..." (Amiga+k) option under the "Edit" menu. A requester named "Data color selector" should pop up. To the left, you should see all available colors... to the right, the values to be colored. You will probably recognize the texts associated with each line of value. There is also two more entries named "Background" and "Floor" which will permits respectively to change the colors of the background, behind the data and the floor, under the data (compare with the final result for better understanding). Select "Floor". A white rectangle will appear around the selected area. Then, choose a color on the left. The little box at the left of the "Floor" text should reflects the color you selected. When you are satisfied with the color you choosed, click on the close gadget to validate your entry (the one at the upper-left of the window). To see the result, selct "Render" one more time. If you don't like the color palette at all, use the "Palette..." menu option to change it. The final step is to save the file as "AegisDraw2000". To do so, select "Draw2000" from sub-menu "Fromat..." from menu "Project" (Amiga+4). Then, choose "Save as..." from "Project" (Amiga+A) that will pop up a file requester asking for the file name of the resulting graph. Enter the name, then press RETURN. The file should now be available for use in any compatible software. For more detail on JcGraph function, go to section 4. 4.Menu options summary. ----------------------- PROJECT About... :Info about JcGraph. Open... :Open a text file (Desciption in section 6). Save :Save the graph. Format is specified in "Format". Save as... :Same as "Save" but request a name. Format :Select the file output format :see section 7. Print... :Outputs to the printer. Beware, you will be asked only once if you want to "CANCEL". Quit... :Quit JcGraph... EDIT Undo :Undo the last rotation. Copy :Not implemented yet. Color... :Let you select color values. The cycle gadget at the bottom of the requester has two position, "Color" and "Grey scale". Grey scale will give you an approximation of what the printed result will look like. Palette... :Let you change color palette value. See Palette section for more info. TEMPLATE Load... :Load a template file wich contain: -the graph type. -rotation positions. -perspective. Save... :Save a template file. GRAPHTYPE Load... :Load a new graph type, 2D or 3D. ENVIRONMENT Iconify :Not implemented yet (mmmmm). Notes... :Let you leave a note on anything you want. If you press the icon at left, you will always be noticed of your note before quitting. Arrange :Organize windows logically on the screen. Req. Flash ON/OFF :Enable/Disable requesters Display Beep. Exec Rexx... :Request for an ARexx script to be executed. Preview OFF/ON :Disable/Enable the preview window. Output Back/Front :When Output window is sized, send it to back or front on final rendering. HELP General... :General help system activation. On Help... :Activate help on using the help system. Start Help :Context-sensitive help. You just have to select the topic on wich you need help to get it. Select back the same option (renamed Stop Helper) to stop. 5.Control panel window: ----------------------- The interface window (Control panel window) is the one with lots of gadget on it. 1. The first line of gadget contain (from the right);identifier of the rotation axis, 'X' in this case, a scroll gadget wich select the value of the 'X' rotation and a string gadget which permits to enter the value numerically. The two other line do the same thing but for the 'Y' and 'Z' axes. Modification of any of the gadget updates the Preview window automatically. 2. The slider gadget named "Perspective" will, as their name implies, will change the perspective value; the more the cursor is sled to the left, the more the graph will look "deformed" (like a camera with a fish-eye), to opposite , sliding it to the right will yield in a more orthogonal-looking graph. This effect is just for visualisation, so it, it will not be saved in the "3D Geo" format. 5.The gadget titled "Undo" will undo the last rotation operation. Menu option "Undo" (Amiga-Z) will do the same thing. 6.The "Render" gadget will gives you the final output on the screen. 7.There is also a cluster of ten button at left. These can be programmed via Arexx to execute ARexx script when pressed. See details in Rexx scripts headers given with JcGraph. 6.File format: Input: --------------------- Here is the text file format description: 1002, 1. Data identifier. Always 1002. 4,2,80,6.0, 2. #Columns,#Lines,Cotation space, Multiplier 10,20,30,40, 3. First ligne 50,60,60,80, 4. Second line Jan,Feb,Mar,Apr, 5. Text under each column. Gaz,Oil, 6. Text under each line. Notes: All value may vary between -1000 and 1000. Data file should end with a comma. When the multiplier is 0, numbers take the integer form (ie without floating point). All entries should be comma separated but can be logically organized with "returns". 7.File format: Output: ---------------------- IFF ILBM: File format compatible with most commercial an public-domain paint program. EPSF COLOR & GRAY: Encapsulated PostScript file format. For now, it is the only format in wich the legend will be automatically created. Unless you have a PostScript interpreter, this file cannot be printed on printer other than PostScript compatible ones. By default, the font used is "Times-Roman". Si you want to output your graph to the printer and you possess a PostScript printer, just save it as EPSF. Then, type to a CLI/SHELL prompt "copy FileName to SER:" if your printer is hooked to the serial port or "copy FileName to PAR:" if it is hooked to the parrallel port. Select COLOR or GRAY EPSF format depending on your printer capability. 3D GEO: Three-dimensionnal file format compatible with most 3D modeler and renderer on the market: 3DProfessionnal, VideoScape, LightWave, Vertex, etc... Text are saved too! Draw2000: Structured file format compatible with the following software: PageStream 2.2, Professionnal Page 3.0, AegisDraw2000. Will produce very high quality graphs even on dot-matrix printer. Note that I had some problem with the AegisDraw import module from PageStream. It seems not to recognize JcGraph's output.I had the same problems with graphs created with Advantage and Multiplot. 8.Graph's modification. ----------------------- 8.1 Font size. You can modify font size. You have to edit the graph type with an ASCII editor. Font size for cotation is the third from the end of the ".grf" file. Font size of the lines' text is the fourth, and the colums' the fith. There is also a way to do it inside JcGraph if you got ARexx (look in ARexx script comments for details or see chapter 12). 9.Keyboard equivalent. ---------------------- PROJECT Right Amiga+O :Open... Right Amiga+S :Save Right Amiga+A :Save as... Right Amiga+1 :Format IFF ILBM Right Amiga+2 :Format EPSF Right Amiga+3 :Format 3D Geo Right Amiga+4 :Format Draw2000 Right Amiga+P :Print... Right Amiga+Q :Quit... EDIT Right Amiga+Z :Undo Right Amiga+K :Color... Right Amiga+, :Palette... TEMPLATE Right Amiga+L :Load... Right Amiga+U :Save... GRAPHTYPE Right Amiga+T :Load... ENVIRONMENT Right Amiga+. :Notes... Right Amiga+R :Arrange... HELP Right Amiga+G :General... Right Amiga+H :On Help... Right Amiga+J :Start Helper/Stop Helper COLOR SELECTOR: Right arrow : Select next color. Left arrow : Select preceding color. Up arrow : Select next line. Down arrow : Select preceding line. OTHERS: F1 : Open/Close preview window. F6 to F10 : ARexx controlled. NB: ESC will get you back from most requester. 10. Palette requester --------------------- This requester will help you change the default color palette of the screen JcGraph is on using both RGB and HSV color model. At the top, there is some standard intuition gadget (ie Close, Depth, etc...) that need not to be documented here (refer to your user manual). The first, leftmost gadget you will see is a recessed box that shows the color actually active. Click on any color at the bottom of the requester and you will it changed accordingly. Right of this gadget is marked vertically with letters RGB followed by three sliders. It means that you are in the RGB model an that every one of the Red, Green and Blue component of the active color can be modified with the appropriate slider at right. Note that values, ranging from 0 to 15, representing the amount of each RGB component are written at slider's right. This color palette selector also offers you the possibility to work with the HSL color model (meaning Hue, Saturation and Luminance), you just have to click on the area marked RGB to see it changed to HSL, click back on HSL to return to the RGB color model. The big, full-color, rectangular gadget at the bottom of the requester is quite self-explanatory; it helps you choose the color you want to be activated. Next to it, at right, is a kluster of gadget that are decribed here: COPY: Copy the active color on to another that you will choose after. RANGE: Will create a range between two color that you will specify. OK: Close the requester and keep your modification CANCEL: Cancel all the change you may have done to the color palette. The menu: Open...: Load a color palette previously saved. Note that because it is IFF format, JcGraph can find color palette in almost any IFF file that as CMAP chunk (ie Preferences palette, DR2D file, ILBM, Imagine file, etc...), this is handy. Save As...: This will save you color palette to a file wich will then be accesible with any IFF CMAP palette reader. (Note that some palette reader make some false assumption about IFF and may have trouble loading JcGraph's IFF file, notabily FreePaint and Commodore's own Palette preferences (on 2.0)!!!) Copy: Copy the entire color palette to the Clipboard. Paste: Paste the entire color palette from the Clipboard. (note: that's a shame that so few program do that :-() Note that pressing ESC on the keyboard or closing the window will have the same effect as clicking on CANCEL gadget. 11.TOOLTYPE and command line options. ------------------------------------- SCREEN=custom :Start JcGraph on a custom screen. SCREEN=workbench :Start JcGraph on the workbench. HELPENGINE=file :Where 'file' is the Help engine used by JcGraph. TOOLPRI=-127 to 127 :Is JcGraph's task priority. PORTNAME=name :Where 'name' is the JcGraph's ARexx port name. STARTUP=scriptname :Where 'scriptname' is an ARexx script to be executed on startup. N.B.: Most of the ToolType are commented out by default using '(' and ')'. 12. ARexx Interface: -------------------- There is now an ARexx interface for JcGraph. Of course, if you're using 1.3 or below, you need the commercial ARexx package from William Hawes or better, spend some money on 2.0. JcGraph rely heavily on ARexx for some of it's new functions like Windows default position, Rexx Button, HotKeys etc... I think I implemented a good set of Rexx commands. The one I like the most is the 'Button' command which open a world of possibilities to the user willing to learn ARexx. Default startup script is a good example of Button command. Feel free to modify my script and to distribute them (If there is one you think that could be useful to other people, send it to me, I will include it in the registered version sent to my users) There is 40+ ARexx commands available from JcGraph. These are (in alphabetical order): ActivateWindow: Function: Select a window to be the current one. Input: INTERFACE/K,OUTPUT/K,PREVIEW/K. Output: None. Note: None. See also: None. Button: Function: Assign a script to one of the ten screen gadget. Input: button number (1 to 10),LABEL=,script path and name. Output: None. Note: ex:"button 7 label=Rend JcGraph:test/tess.rex" Parameter's position can't be changed. See also: Keyboard. Close: Function: Quit JcGraph. Input: FORCE/S. Output: None. Note: Same as Quit (only there to be Style Guide complient) See also: Quit. Copy: Function: Input: Output: Note: Should be activated in version 1.2. See also: GetDataColor: Function: Input: Output: Note: Should be activated in version 1.2. See also: GetFormat: Function: Return JcGraph's current output file format. Input: None. Output: As string: 1- IFF ILBM 2- EPSF Gray 3- EPSF Color 4- 3D Geo 5- Draw 2000 Note: None. See also: SetFormat. GetGraphType: Function: Returns the path to the curent graph type file + filename. Input: None. Output: path + filename. Note: If returned value is DFLT, it means that no graph type has been loaded and the default one is used. If no string is returned, it means that no graph type is vailable. See also: LoadGraphType. GetRotation: Function: Returns X,Y and Z rotation values. Input: None. Output: X, Y and Z values respectivly as string, space separated. Note: ex:"12 34 45". See also: SetRotation,GetX,GetY,GetZ,SetX,SetY,SetZ. GetScreenAddress: Function: Get JcGraph's screen structure pointer. Input: None. Output: None. Note: Useful to seemlessly integrate your code with JcGraph. See also: none. GetTypeValue: Function: Returns graph type specific data. Input: Data position. Output: Value as string. Note: The data index value is absolutly not validated, so, be careful. See also: SetTypeValue. GetX: Function: Returns X rotation value. Input: None. Output: X rotation value string. Note: None. See also: SetRotation,GetRotation,GetY,GetZ,SetX,SetY,SetZ. GetY: Function: Returns Y rotation value. Input: None. Output: Y rotation value string. Note: None. See also: SetRotation,GetRotation,GetX,GetZ,SetX,SetY,SetZ. GetZ: Function: Returns Z rotation value. Input: None. Output: Z rotation value string. Note: None. See also: SetRotation,GetRotation,GetY,GetX,SetX,SetY,SetZ. Keyboard: Function: Assign an ARexx script to key F6 to F10. Input: KEY/K,CMD/K. Output: None. Note: ex:"Keyboard key=F6 cmd=rexx:test.rex" See also: Button. LoadGraphType: Function: Load a new type of graphic. Input: filename. Output: None. Note: ex:'LoadGraphType work:jcgraph/graphtype/gugusse3D.grf' If no filename is given, a file requester will pops-up. See also: GetGraphType. MoveWindow: Function: Set the current window's position. Input: TOPEDGE/K,LEFTEDGE/K. Output: Window position before moving it (LeftEdge and TopEdge). Note: Value of -1 in TopEdge or LeftEdge fields will result in no change in position. See also: SizeWindow. Nop: Function: Does absolutly nothing. Input: None. Output: None. Note: None. See also: None. Open: Function: Opens a JcGraph ASCII data file. Input: FILENAME/K. Output: None. Note: If no filename is given, a requester asking for one will pop-up. See also: Close, Quit. Print: Function: Dumps the graph to the printer. Input: none. Output: 10= no graph rendered. Note: None. See also: None. Quit: Function: Quit JcGraph. Input: FORCE/S. Output: None. Note: Force suppresses the modified project requester. See also: Close. Render: Function: Render a graph using current settings. Input: None. Output: None. Note: If no data or graph type is loaded, a requester will pops-up telling you so. See also: None. RequestFile: Function: Pops up a file requester. Input: TITLE/K,PATH/K,FILE/K,PATTERN/K. Output: RC=0->OK, RC=5->CANCEL, RESULT=full path + file. Note: None. See also: RequestString,RequestNumber,RequestResponse,RequestNotify. RequestNotify: Function: Pops a requester with some text and OK gadget. Input: message. Output: None. Note: This is slightly different from the Style Guide; ex: 'RequestNotify This is the message' See also: RequestString,RequestNumber,RequestResponse,RequestFile. RequestNumber: Function: Pops a requester with text, Integer, OK and CANCEL gadgets. Input: message. Output: if RC=0 -> OK, RC=5 -> CANCEL . Result=Number as string. Note: This is slightly different from the Style Guide; ex: 'RequestNumber This is the message' See also: RequestString,RequestNotify,RequestResponse,RequestFile. RequestResponse: Function: Pops a requester asking for a OK/CANCEL response. Input: message. Output: RC=0 if OK, RC=5 if CANCEL. Note: This is slightly different from the Style Guide; ex: 'RequestResponse This is the message' See also: RequestString,RequestNumber,RequestNotify,RequestFile. RequestString: Function: Pops a requester with text, String, OK and CANCEL gadgets. Input: message. Output: if RC=0 -> OK, RC=5 -> CANCEL . Result=string. Note: This is slightly different from the Style Guide; ex: 'RequestString This is the message' See also: RequestNumber,RequestNotify,RequestResponse,RequestFile. Rx: Function: Execute a rexx script asynchronously. Input: Rexx script name. Output: None. Note: This is slightly different from the Style Guide; ex: 'Rx work:test.rex' See also: None. Save: Function: Save the graph using current output format. Input: None. Output: None. Note: None. See also: SaveAs. SaveAs: Function: Save the graph using current output format with the specified name. Input: NAME/K. Output: None. Note: If no name is given, a file requester will pops-up. See also: Save. ScreenToBack: Function: Brings JcGraph's screen to back. Input: None. Output: None. Note: None. See also: ScreenToFront. ScreenToFront: Function: Brings JcGraph's screen to front. Input: None. Output: None. Note: None. See also: ScreenToBack. SetDataColor: Function: Input: Output: Note: Should be activated in version 1.2. See also: SetDisplayBeepOn: Function: Enable screen flashes when a requester appear. Input: None. Output: None. Note: None. See also: SetDisplayBeepOff. SetDisplayBeepOff: Function: Disable screen flashes when a requester appear. Input: None. Output: None. Note: None. See also: SetDisplayBeepOn. SetFormat: Function: Set current JcGraph output file format. Input: File format number. Output: 0 if ok, 10 otherwise. Note: Format number: 1- IFF ILBM 2- EPSF Gray 3- EPSF Color 4- 3D Geo 5- Draw 2000 See also: GetFormat. SetRotation: Function: Set X,Y and Z rotation value respectivly. Input: x value, y value, z value. Output: None. Note: ex: "SetRotation 12 32 14" See also: SetX, SetY, SetZ, GetX, GetY, GetZ, GetRotation. SetTypeValue: Function: Set graph type specific data. Input: index of value to be changed, value. Output: None. Note: Value and inded aren't validated at all, so, be carefull. See also: GetTypeValue. SetX: Function: Set X rotation value. Input: value. Output: None. Note: ex: "SetX 10" See also: SetY, SetZ, GetX, GetY, GetZ, GetRotation, SetRotation. SetY: Function: Set Y rotation value. Input: value. Output: None. Note: ex: "SetY 10" See also: SetX, SetZ, GetX, GetY, GetZ, GetRotation, SetRotation. SetZ: Function: Set Z rotation value. Input: value. Output: None. Note: ex: "SetZ 10" See also: SetY, SetX, GetX, GetY, GetZ, GetRotation, SetRotation. SizeWindow: Function: Set the current window's size. Input: WIDTH/N,HEIGHT/N. Output: Window size before sizing it (Width and Height). Note: Value of -1 in width or height fields will result in no change in size. Interface window can't be sized, so, it will only return it's size. See also: MoveWindow. Version: Function: To get JcGraph's version number. Input: None. Output: Version number in form 'ProgramName 9.99 (DD/MM/YY)' Note: None. See also: None. WindowToFront: Function: Brings current window to front. Input: None. Output: None. Note: None. See also: WindowToBack, ActivateWindow. WindowToBack: Function: Brings current window to back. Input: None. Output: None. Note: None. See also: WindowToFront, ActivateWindow. 13.Graph type file format: -------------------------- I think this is one of the best part of JcGraph (from a programmer's point of view) it brings me back about 2 years ago: I have seen some Amiga, Mac and PC charting program and what striked me is that it seemed that there was a piece of code for each one of the graphs... what a waste! There was surely a way to draw a general rule for creating all the graphs and after some hours of refining an inital idea, I came up with this: 1001, : Graph type identifier. GraphType points: ----------------- Points are organized in two sets of X,Y values. First X,Y set is for the bottom of the block, second , for the top. 4, : Total number of points of one block. 0,0, : 1. X,Y of the bottom. 0,20, : 1. X,Y of the top. 40,0, : 2. X,Y of the bottom. 40,20, : 2. X,Y of the top. 40,40, : 3. X,Y of the bottom. 40,20, : 3. X,Y of the top. 0,40, : 4. X,Y of the bottom. 0,20, : 4. X,Y of the top. Inter-block links: ------------------ 2,3,1,4, : If link flag is set, point 2 of the one block will be linked with point 1 of the following X block. 3 linked to 4. Just two links per side are allowed. 3,4,2,1, : If link flag is set, point 3 of the one block will be linked with point 2 of the following Y block. 4 linked to 1. Just two links per side are allowed. GraphType Flags: ---------------- 2,2, : X , Y data rows and columns of preview. 70, : Next column spacing. 70, : Next line spacing. 2, : Y data multiplier. 0, : Joined X ? (0 or 1) 0, : Joined Y ? (0 or 1) 0, : Stacked ? (0 or 1) 1, : 3-D ? (0 or 1) 0, : Percent (pie chart) ? (0 or 1) 0, : Block top only ? (0 or 1) 0, : Inter-block only ? (0 or 1) 0, : 90 degree rotation of block ? (0 or 1) 0, : Next line shear value. 0, : ALWAYS 0. 0, : SIDEBYSIDE ( 0 or 1) 0, : Y shear value. 0, : Undefined. 40, : Max. X block size. 40, : Max. Y block size. 15, : Font scale to X (scale to points value) 15, : Font scale to Y. 15, : Font scale to Z. 10, : Z text offset from graph. 20, : X text offset from graph. I think this design is a good compromise between flexibility, simplicity and size. Experiment with it... no validation is done on graph type but anyway, you should know what you are doing when creating a new graph type. Of course, this is FAR from perfection and I now see many possible upgrades to this format that would require a severe re-write of most part of my code and unless some gigantic mega software compagny pay me to do that, I will leave this to the reader. Of course, you cannot use this in commercial code but if you want to share some ideas, write to me, I will be pleased to answer your letter. 14.The future of JcGraph: ------------------------- JcGraph is the first important piece of code I write for the Amiga. And even if I spent much time to it's realisation, some features could not have been implemented, because of a lack of time and funding (beeing a full time student). So I privilegied quality over quantity. But, if the effort I put in JcGraph would reflect in a high number of registration, I would probably spend some more time upgrading it. Here is a list of what could be in a future release: -Some more ARexx scripts. -Some more ARexx commands. -LightWave file format. -DR2D. THE BOTTOM LINE (READ IT BEFORE SENDING ANY MONEY): --------------------------------------------------- It is sad because I haven't had enough registration to be worth continuing to upgrade JcGraph. Maybe I haven't spread it enough but I guess it's not just that. Anyway, I will continue to fix bugs for my registered users and I MAY do some minor upgrades someday (really no garantee here). What bugs me the most is that every people that tried my software seemed to enjoy it a lot. Well, I will take a short Amiga programming break and will come back with other projects that are knocking to get out of my head :-0. JcGraph was many things to me: First, it was a proof that I can take a programming project of good proportion (for a single person) from the ground to a commercial quality state (I think so). Second, it was an answer to those stupid pirates who say "Ah, software are too high priced and all the money goes to a big guy in a Rolls-Royce". Well, my piece of code hasn't any equivalent on the Amiga market yet(and in some way, on any market) and it cost 40$ CDN. And I have no other mean of transportation than my own legs. Anyway, if you don't want my software, you can still mail to me, I stand for communication and I like to ear from people. Any suggestion or comment can be send to: Jean-Christophe Clément 921, rang 3 St-Simon Québec, CANADA J0H-1Y0 If you send me suggestions, please, send them in descending order of priority (ie If you BADLY want feature A over feature B, put it first!). If you report a bug, please give an example and be precise because it may be clear in your mind but not in mine (ex: if you say "many more", I want to know how much it is !). 15.JcGraph's history: --------------------- april 23 , 1992:(v0.90) -Beta release. april 27 , 1992:(v0.901) -Corrected little mem alloc bug. april 30 , 1992:(v0.902) -Added precision on 2D graphs. -Stack graph added. -Better support for floating point value. may 14 , 1992:(v0.903) -Corrected one small problem with perspective. october 10 , 1992:(v1.100) Major upgrade!! -Corrected some stupid bugs (no more problem on quit.) -Added an ARexx port (40+ commands) almost fully 2.0 style guide compliant. -Now supports the standard file requester under WB 2.0 (so that you can trap it with the incredible "Magic File Requester" from Stefan Stuntz. Boy, this requester is 1/2 as big as JcGraph (80k vs 170k) but worth every single bytes!). For those poor people who still use WB < 2.0... Get it (2.0) the soonest possible, you won't regret it. But until then, JcGraph will use the KD_freq for you!! -Well, it's been one months I've been using JcGraph about 5 hour a day and it has not crashed on me once. Configuration were varying from 512k to 3 full megs. So, I guess I can say it is quite robust now... -JcGraph now come with a nice disk sticker!! -A nice Color Palette editor has been added based on one done by RJ Mical with some eastethic and ergonomic enhancement. -Should not have problem with bigger fonts anymore. -Preview can now be sized and closed. -MANY useful Rexx scripts are included. -JcGraph does some more file checking on data. -more startup options. -other small stuff that you will be happy to discover yourself !! Thanks to: Richard Loubier, Pierre-Louis Constantin, Steve Davis, Dominic Giampaolo and all those who supported my work on JcGraph.