








                                     Developed By
                                    Peter M. Freese

                                   Documentation By
                              Peter Freese and Frej Krook

                                     Published By
                                       CyberSoft
                                      Buckley, WA


                                        Notice

        The information contained in this document is subject to change without
           notice. While every effort is made to ensure the accuracy of the
          information contained herein, CyberSoft shall not be liable for any
         errors or consequential damages in connection with the performance or
                                 use of this material.

          This document contains proprietary information that is protected by
        copyright. No part of this document may be photocopied, reproduced, or
                 translated without the written consent of CyberSoft.

                                DISCLAIMER OF WARRANTY

        THIS SOFTWARE AND MANUAL ARE SOLD "AS IS" AND WITHOUT WARRANTIES AS TO
       PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED
         OR IMPLIED. BECAUSE OF THE VARIOUS HARDWARE AND SOFTWARE ENVIRONMENTS
           INTO WHICH THIS PROGRAM MAY BE PUT, NO WARRANTY OF FITNESS FOR A
        PARTICULAR PURPOSE IS OFFERED. GOOD DATA PROCESSING PROCEDURE DICTATES
          THAT ANY PROGRAM BE THOROUGHLY TESTED WITH NON-CRITICAL DATA BEFORE
           RELYING ON IT. THE USER MUST ASSUME THE ENTIRE RISK OF USING THE
          PROGRAM. ANY LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO
                   PRODUCT REPLACEMENT OR REFUND OF PURCHASE PRICE.


                              Second Printing, March 1994
                   Printed and bound in the United States of America

                          Copyright c 1993, 1994 by CyberSoft
                                  All Rights Reserved

       IntelliGraph_ is a trademark of CyberSoft. Other products are trademarks
                             of their respective holders.








                                                               Table of contents





                      PART 1                                         1


                           Introduction                              3
                           Why IntelliGraph? ........................3
                           Hardware and software requirements .......4
                           What you need to know ....................4
                           How to use this manual ...................4
                           Installing IntelliGraph ..................5
                           Linking IntelliGraph .....................5
                           How to contact CyberSoft .................6

                           Learning IntelliGraph                     7
                           Your first IntelliGraph ..................7
                           Multiple graphs at once ..................9
                           Dressing up graphs ......................12
                           Changing graph attributes ...............15
                           Axis control ............................17
                           Summary ................................ 20

                           Using IntelliGraph                       21
                           IntelliGraph work areas .................21
                           Storing data ............................22
                           Displaying a graph ......................25
                           Special data values .....................27
                           Scaling ................................ 28
                           Getting graph information ...............31
                           Font usage ..............................32
                           IntelliGraph error handling .............34
                           Using bitmapped flags ...................37
                           Printing ................................37
                           Troubleshooting .........................38


                      Part 2                                        41

                           IGAmp ...................................43
                           IGColors ................................44
                           IGDelete ................................46
                           IGInfo ..................................47
                           IGLabels ................................49
                           IGLegends ...............................50
                           IGLegendStyle ...........................51
                           IGNew ...................................52
                           IGPatterns ..............................54
                           IGSColor ................................56


                                                                   iii



                                                     Table of contents


                           IGSelect ................................57
                           IGShow ..................................58
                           IGSymbols ...............................61
                           IGTitleG ................................62
                           IGTitleX ................................63
                           IGTitleY ................................64
                           IGWindow ................................65
                           IGXAxisScale ............................66
                           IGXAxisStyle ............................67
                           IGYAxisScale ............................69
                           IGYAxisStyle ............................70


                      Index                                         73










































                                                                    iv
















                                                                          PART 1


                                                   Programming with IntelliGraph










































                                                                     1









                                                                    Introduction



                      IntelliGraph functions are a simple but very effective
                      way to create presentation quality graphs. The complex
                      programming required with standard dGE function for
                      scaling, positioning, titles, axes, etc., is not
                      necessary with IntelliGraph. Instead, all you need to
                      provide is the data to be graphed, and IntelliGraph does
                      the rest.


       Why IntelliGraph?

                      If you've ever written code to create what at first
                      glance might appear to be a simple chart, you'll have a
                      great appreciation for what IntelliGraph can do for you.
                      The scaling of data, generation of axes and labels, and
                      positioning of screen elements is a complex and byzantine
                      process. If the data you are presenting can greatly vary,
                      the process is even more difficult. If you are new to
                      graphing, you're already ahead of the game with
                      IntelliGraph.

                      IntelliGraph will scale and position your graph for you,
                      and automatically generate and draw labels and axes.
                      IntelliGraph can also handle colors, titles, legends and
                      other graph features. IntelliGraph is simply the quickest
                      and easiest way to produce standard graphs with dGE. For
                      most graphing applications, IntelliGraph may be all you
                      need.

        Standard dGE  This is not to say that IntelliGraph limits your
       functions and  flexibility or style options. You can override
        IntelliGraph  IntelliGraph's defaults for colors and patterns, etc.,
       functions may  with very few lines of code. You can retrieve and modify
       be intermixed  any of the calculations that IntelliGraph does
         freely in a  automatically so that you can customize IntelliGraph to
            program.  suit your needs. Also, you can use standard dGE functions
                      in conjunction with IntelliGraph functions so that you
                      can combine IntelliGraph's speed, ease, and shorter code
                      with standard dGE's power and flexibility.

                      IntelliGraph provides support for the most popular styles
                      of business graphs, and new graphs are being added over
                      time. If you are looking for a particular type of graph
                      but don't see it documented, contact CyberSoft.






                                                                     3



                                                          Introduction


       Hardware and software requirements

                      To use IntelliGraph, you'll need to have dGE version 5.0
                      or later, and CA-Clipper 5.0 or later.

                      IntelliGraph uses dGE as a low level graphics interface,
                      so your hardware requirements will be determined by dGE.
                      Essentially, IntelliGraph will support any hardware that
                      is supported by dGE.

                      Although it is not required, we recommend that you link
                      your applications with a linker that can either create
                      extended mode executables, or dynamically overlay code.
                      dGE occupies a fairly large code footprint, and when
                      combined with other 3rd party libraries, may limit the
                      amount of conventional memory available to your
                      application.

                      IntelliGraph is compatible with both Blinker 3.0 and Exo-
                      Space.


       What you need to know

                      You should be comfortable with Clipper programming, and
                      have a rudimentary understanding of programming graphics.
                      You should understanding how to use dGE to set up
                      graphics mode, and how to return to text mode.

                      You should be familiar with the use of manifest
                      constants; IntelliGraph uses constants (all defined in
                      IGRAPH.H) to define possible parameters for nearly every
                      function.


       How to use this manual

                      This manual is dividing into two main parts:

                         Part 1 Programming with IntelliGraph introduces you to
                         the basic principles behind IntelliGraph, and contains
                         an overview, a tutorial, and detailed explanations on
                         some of the aspects of using IntelliGraph.

                         Part 2 Library Reference is a complete reference for
                         all IntelliGraph functions in alphabetical order.

                      If you want to get started quickly with IntelliGraph, you
                      should browse through the tutorial chapter, Learning
                      IntelliGraph, beginning on page 6.






                                                                     4



                                                          Introduction


                      To learn more about the organization of graph data, work
                      areas, scaling, and error handling, read Using
                      IntelliGraph starting on page 17.

                      When you need to find out how to use a particular
                      function, consult the Library Reference in Part 2.


       Installing IntelliGraph

                      The registered version of IntelliGraph is supplied on a
                      single high density disk. Before installing, first make a
                      backup of the diskette. Yes, we know, that's what they
                      always say, but a few minutes extra of your time in
                      advance could save you days (and money) later.

                      IntelliGraph comes with an automatic installation program
                      called INSTALL, which is fairly straight-forward to use.
                      Just run it from the installation disk, and answer the
                      prompts for destination disk and directory.

                      If INSTALL fails to correctly install IntelliGraph, you
                      can install IntelliGraph manuals as follows:

                         Create a directory called IGRAPH (or name of your
                         choice) on your hard disk.

                         Copy the file IGRAPH.EXE into the newly created
                         directory.

                         Switch to the IGRAPH directory, and run IGRAPH.EXE. It
                         will self extract all of the IntelliGraph files in the
                         current directory.

       Add IGRAPH to  It is recommended that you add IGRAPH to your LIB and
        your LIB and  INCLUDE environment variables to make using and linking
             INCLUDE  IntelliGraph simpler. You will need to do this manually,
         environment  regardless of whether you use INSTALL or not. To add them
       variables for  to your environment variables, modify your AUTOEXEC.BAT
             simpler  file.
         compilation
        and linking.

       Linking IntelliGraph

                      Integrating IntelliGraph into your dGE application is a
                      snap. You only need to add IGRAPH.LIB into your link
                      command or link script.

                      Here is a sample dGE link script, with linker-specific
                      commands removed for clarity (linking dGE is covered in
                      the Programmer's Guide that came with dGE):




                                                                     5



                                                          Introduction



                         FI MYPROG        # Your program
                         FI DGE16         # The dGE video driver
                         LIB DGECL5       # The dGE library


                      all you have to add to this link script is:



                         FI MYPROG        # Your program
                         FI DGE16         # The dGE video driver
                         LIB DGECL5       # The dGE library
                         LIB IGRAPH       # The IntelliGraph library


                      That's it! You are now ready to use IntelliGraph.
                      IntelliGraph is compatible with real and protected mode
                      linkers.


       How to contact CyberSoft

                      If you encounter any problems using this package, find a
                      bug, or even want to tell us how much you like
                      IntelliGraph, please use the following methods.

                 *    Send Internet mail to:

                      pfreese@hebron.connected.com

                      Send CompuServe mail to:

                      74170,543

                 *    Send conventional postal mail to:

                      CyberSoft
                      22212 110th St. E.
                      Buckley, WA  98321

                 *    Limited telephone support is available. By limited, we
                      mean that we don't have staff available around the clock
                      to provide immediate technical support. If you have an
                      urgent problem, or wish to speak with someone about a
                      non-technical issue, you may reach us at:

                      (206) 862-5360








                                                                     6










                                                           Learning IntelliGraph



                    This tutorial will show you how to use IntelliGraph by
                    taking you through a series of example programs. With a few
                    exceptions, each example builds upon the previous to show
                    the amount of control that IntelliGraph gives you over your
                    graphs.

               *    The code examples in this section are written in Clipper
                    5.2. We've left out extraneous code, such as the setting of
                    the video mode, for clarity, since the purpose of the code
                    in this chapter is simply to demonstrate the fundamentals of
                    using IntelliGraph.

                    The examples make use of manifest constants contained in
                    IGRAPH.CH. You should have the line:


                      #include  "IGRAPH.CH"


                    at the beginning of any program that uses IntelliGraph.

                    You can find the examples in this tutorial all contained in
                    a single file, EXAMPLES.PRG. Rather than provide each as a
                    separate program, we've included them all in a single
                    program that acts as a shell, allowing you to select a
                    graphics mode and which example you wish to run. This allows
                    us to concentrate on how to use IntelliGraph, rather than
                    how to initialize dGE.

                    To compile and link the examples program, type MAKEEXAM in
                    your IntelliGraph directory. MAKEEXAM is a batch file which
                    invokes RMAKE, so you will need RMAKE in your path.


     Your first IntelliGraph

                    Let's start our tour of IntelliGraph by examining how to
                    create a very basic graph. The following lines of code are
                    all you need to produce a bar graph with IntelliGraph:









                                                                  7



                                              Learning IntelliGraph





                      LOCAL nHandle
                      LOCAL aData := { { 27, 53, 37 }, { 44, 12, 69 } }

                        nHandle := IGNew()
                        IGAmp(aData)
                        IGShow(IGBAR2D)

                        INKEY(0)
                        IGDelete(nHandle)


                    This code produces the following graph:

        Figure 2.1



















                    For the graphs shown in this chapter, the colors shown will
                    not necessarily correspond to the colors on your monitor if
                    you were to run this code. For instance, the axes are black
                    on a white background here, but would be white on a black
                    background on your screen. The bars are shown in this manual
                    as shades of gray, but the bars on your screen would be blue
                    and green. The graph data is the same; we simply used colors
                    here that look better on a white page.

                    Let's look at the IntelliGraph functions used above one at a
                    time:

                      IGNew() initializes an IntelliGraph work area and returns
                      a handle to that area. An IntelliGraph work area is
                      analogous to a database work area, and allows you to
                      manipulate multiple graphs concurrently. You need to call
                      IGNew() before any other IntelliGraph function.



                                                                  8



                                              Learning IntelliGraph




                      IGAmp(aData) passes amplitude data to IntelliGraph.
                      IntelliGraph analyzes the array to determine that there
                      are 2 data groups, and 3 data points in each group. Group
                      1 is data points 1, 3, and 5. Group 2 is data points 2,
                      4, and 6.

                      IGShow(IGBAR2D) displays the graph. The parameter IGBAR2D
                      indicates the type of graph to display.

                      IGDelete(nHandle) deletes the IntelliGraph work area
                      associated with nHandle.

                    Four IntelliGraph functions are all that were used above to
                    draw a bar graph. This is substantially easier than
                    producing an identical graph using the standard dGE
                    functions. As you can see, IntelliGraph produces attractive
                    graphs with fewer lines of code.


     Multiple graphs at once

                    IntelliGraph allows you to manipulate multiple graphs at
                    once with its work area concept. Let's expand our example to
                    examine how we can create and display more than one graph at
                    a time.


     Using more than one work area

                    IntelliGraph work areas (discussed on page 21) are easy to
                    use. Simply put, you need one work area for every graph you
                    are working with concurrently. To create more that one
                    graph, we need to create more than one work area. Only one
                    work area can be active at a time. All IntelliGraph
                    functions act upon the current active work area. We've
                    already seen how to create a work area with IGNew() and how
                    to delete them with IGDelete(). We can switch the active
                    work area at any time by calling IGSelect() with a work area
                    handle:



                      IGSelect(nHandle)











                                                                  9



                                              Learning IntelliGraph




     Graph windows

                    Every graph IntelliGraph draws needs to be in a window. A
                    window is the screen location to which IntelliGraph draws
                    the graph. The entire graph (including axes, labels, titles,
                    and legends) is scaled to fit within the window you define.
                    You define a window for the current work area by calling



                      IGWindow(nLeft, nBottom, nRight, nTop)


                    nLeft and nBottom are the left and bottom coordinates of the
                    window. nRight and nTop are the right and top coordinates.

                    If you do not define a window with IGWindow(), IntelliGraph
                    will display the graph full screen.


     Multi-graph example

                    Let's look at the previous code example, adapted to use two
                    work areas and draw two graphs on the same screen:



                      LOCAL nHandle1, nHandle2
                      LOCAL aData := { { 27, 53, 37 }, { 44, 12, 69 } }

                        nHandle1 := IGNew()
                        IGWindow(50, 50, 600, 950)
                        IGAmp(aData)

                        nHandle2 := IGNew()
                        IGWindow(700, 50, 1300, 950)
                        IGAmp(aData)

                        IGSelect(nHandle1)
                        IGShow(IGBAR2D)

                        IGSelect(nHandle2)
                        IGShow(IGHBAR2D)

                        INKEY(0)
                        IGDelete(nHandle1)
                        IGDelete(nHandle2)


                    This code produces these graphs:




                                                                 10



                                              Learning IntelliGraph




        Figure 2.2


















                    Let's look at the new IntelliGraph functions used above one
                    at a time:

                      nHandle1 := IGNew() creates the first IntelliGraph work
                      area.

                      IGWindow(50, 50, 600, 950) defines the size of the window
                      on the left.

                      IGAmp(aData) passes amplitude data for the graph in this
                      work area only. This is the same data as used in the
                      previous example.

                      The second call to IGNew() creates a new work area,
                      associates it with nHandle2, and makes it the currently
                      active work area. Now all data passed to IntelliGraph
                      will apply only to the graph in work area nHandle2, not
                      to the graph in work area nHandle1.

                      IGWindow(700, 50, 1300, 950) defines the size of the
                      window on the right, to be used for the graph in work
                      area nHandle2.

                      The second call to IGAmp(aData) passes amplitude data for
                      the graph in the second work area only. Note that we
                      although we are using the same amplitude data for both
                      work areas, IGAmp() must be called once for each area.

                      IGSelect(nHandle1) activates the first work area. Now any
                      IntelliGraph function will apply only to the first graph,
                      not the graph referenced by nHandle2.




                                                                 11



                                              Learning IntelliGraph




                      IGShow(IGBAR2D) draws the graph on the left, since it is
                      the active work area.

                      IGSelect(nHandle2) activates the second work area.

                      IGShow(IGHBAR2D) draws the graph on the right. The
                      parameter IGHBAR2D indicates that this is a horizontal
                      bar graph.

                      IGDelete() is used twice; once for nHandle1 and once for
                      nHandle2. This deletes the two work areas.


     Automatic scaling

                    Notice that although both graphs used the same data, their
                    axes are not labeled quite the same. The Y axis of the
                    vertical bar graph extends from 0 to 70, and the X axis on
                    the horizontal bar graph extends from 0 to 80. The axes are
                    also divided into different ranges with the tick marks
                    (called tick intervals.) Why is this?

                    The reason for the difference is axis scaling. IntelliGraph
                    had to fit the same range of values in a smaller space
                    horizontally than it did vertically, so it chose a larger
                    tick interval of 20 for the horizontal bar graph.
                    IntelliGraph will guarantee that axis ranges always extend
                    to multiples of the tick interval; in this case it meant
                    that the graph on the right had a range of 0 to 80.

                    We'll learn more about automatic scaling and how to override
                    it later in this tutorial.


     Dressing up graphs

                    Up to this point, the graphs we have created have contained
                    nothing more than the most basic graphic elements: the data
                    in bar form, and the axes with default labels. In order for
                    a graph to convey meaning, we need to display additional
                    textual information.

                    Each IntelliGraph graph is made up of a set of graphical
                    objects:

                      Data in bar, line, or symbol form

                      Axes and associated grids

                      Labels for axes




                                                                 12



                                              Learning IntelliGraph




                      Text for the legend and the legend itself

                      Main graph title

                      Titles for axes

                    The text components of the graph are illustrated in Figure
                    2.3.

        Figure 2.3
        Graph text














                    Text data used to define these objects is passed using these
                    IntelliGraph functions:


                                 Function   Defines
                                 IGLabels   Labels for ordinal
                                            axis
                                 IGLegends  Labels for each data
                                            group in legend
                                 IGTitleG   Graph title

                                 IGTitleX   X axis title

                                 IGTitleY   Y axis title



     Graph text example

                    Let's look at our first example graph again (from page 7).
                    This time, let's add some new functions to define the graph
                    text components:







                                                                 13



                                              Learning IntelliGraph





                      LOCAL nHandle
                      LOCAL aData := { { 27, 53, 37 }, { 44, 12, 69 } }
                      LOCAL aLabels := { "April", "May", "June" }
                      LOCAL aLegends := { "Red Widgets", "Blue Widgets" }

                        nHandle := IGNew()

                        IGAmp(aData)

                        IGLabels(aLabels)
                        IGLegends(aLegends)

                        IGTitleG("Quarterly Report")
                        IGTitleX("Month")
                        IGTitleY("Units sold")

                        IGShow(IGBAR2D)

                        INKEY(0)
                        IGDelete(nHandle)


                    This code produces the following graph:

        Figure 2.4



















                    Let's look at the new IntelliGraph functions used above one
                    at a time:







                                                                 14



                                              Learning IntelliGraph




                      IGLabels(aLabels) defines the labels for the ordinal axis
                      of the graph. This type of label is typically placed
                      along the X axis. If you don't supply these labels,
                      IntelliGraph will create default numeric labels.

                      IGLegends(aLegends) defines the text for the legend
                      entries. There is typically one legend entry for each
                      data group. The legend text entries are "Red Widgets"
                      and "Blue Widgets."

                      IGTitleG("Quarterly Report") defines the graph title,
                      which is positioned centered above the graph by default.

                      IGTitleX("Month") defines the title of the X axis.

                      IGTitleY("Units Sold") defines the title of the Y axis.


     Changing graph attributes

                    IntelliGraph selects colors, patterns, and symbols
                    automatically from an internal list. The default list is
                    designed to minimize similarities between adjacent groups.
                    Optionally, you can define these attributes yourself using
                    the following IntelliGraph functions.

      All of these           Function    Defines
     functions are
       used before           IGColors    Color data for bars, lines,
           calling                       symbols, etc. to be used
      IGShow() and           IGPatterns  Pattern data for solid
           have no                       surfaces, such as bars
           visible           IGSymbols   Symbols for individual data
      effect until                       points
             then.

     A stylish example

                    Let's adapt the code from the previous example (on page 13)
                    to include some of these other IntelliGraph features. Since
                    we're graphing sales for red and blue widgets, we'd like the
                    bars to be red and blue. Let's also change the bars from
                    solid to patterns.











                                                                 15



                                              Learning IntelliGraph





                      LOCAL nHandle
                      LOCAL aData := { { 27, 53, 37 }, { 44, 12, 69 } }
                      LOCAL aLabels := { "April", "May", "June" }
                      LOCAL aLegends := { "Red Widgets", "Blue Widgets" }

                        nHandle := IGNew()

                        IGAmp(aData)

                        IGLabels(aLabels)
                        IGLegends(aLegends)

                        IGTitleG("Quarterly Report")
                        IGTitleX("Month")
                        IGTitleY("Units sold")

                        IGColors({RED, BLUE})
                        IGPatterns({13, 14})

                        IGShow(IGBAR2D)
                        INKEY(0)
                        IGDelete(nHandle)


                    This code produces the following graph:

        Figure 2.5



















                      IGColors({RED, BLUE}) passes color information to
                      IntelliGraph. Each group can be a unique color. We passed
                      an array containing 2 colors, RED and BLUE, one for each
                      group.



                                                                 16



                                              Learning IntelliGraph




                      IGPatterns({13, 14}) defines pattern data for
                      IntelliGraph, in the same way that IGColors() defines the
                      color data. The available patterns can be found in your
                      dGE manual. Patterns 13 and 14 are selected.


     Axis control

                    IntelliGraph provides a great deal of flexibility in the way
                    that graphs are displayed, particularly in the control you
                    have over the graph axes. The default behavior is designed
                    to satisfy the needs of the most common graphs, but you can
                    override nearly every aspect of the display.


     Axis style options

                    You can change the appearance, formatting, and location of
                    either of the graphs axes with two functions:



                      IGXAxisStyle(nStyle)
                      IGYAxisStyle(nStyle)


                    The nStyle parameter is defined by adding together one or
                    more axis style constants:


                          Constant     Definition
                          AS_BOTTOM    Forces the X axis to appear at the
                                       bottom of the graph
                          AS_GRID      Draws grid lines at every tick
				       interval
                          AS_LEFT      Forces the Y axis to appear at the
				       left of the graph
                          AS_NOLABELS  Prevents the display of the axis
                                       labels
                          AS_NORMAL    Forces the axis to maintain normal
                                       left to right, bottom to top order
                          AS_NOTICKS   Prevents the display of axis tick
                                       marks
                          AS_ORIGIN    Forces the X or Y axis to be drawn so
                                       that it intersects the other axis
				       origin
                          AS_REVERSE   Reverses the left to right, bottom to
                                       top order of the axis
                          AS_RIGHT     Forces the Y axis to appear at the
				       right of the graph




                                                                 17



                                              Learning IntelliGraph




                          AS_TOP       Forces the X axis to appear at the
                                       top of the graph


                    The five location styles, AS_BOTTOM, AS_LEFT, AS_ORIGIN,
                    AS_RIGHT, and AS_TOP, are all mutually exclusive. By
                    default, IntelliGraph places each axis so that it intersects
                    the other axis' origin.


     Axis scaling

                    IntelliGraph's scaling of both the X and Y axes can be
                    controlled using two functions:



                      IGXAxisScale(nOrigin, nMin, nMax, nTick)
                      IGYAxisScale(nOrigin, nMin, nMax, nTick)


      You can have  With any of the parameters for IGXAxisScale() or
      IntelliGraph  IGYAxisScale(), you can pass a special value, defined by the
     calculate the  constant AUTO, to have IntelliGraph calculate the value
        values for  automatically.
       any scaling
     parameters by  The parameter nOrigin allows you to specify the origin of
       passing the  the axis. The origin, which is 0 by default, is simply the
          constant  point along the axis at which the two axes intersect.
             AUTO.
                    nMin and nMax are the axis minimum and maximum respectively.
                    By default, IntelliGraph calculates these from your data, so
                    that the range includes all the data points and the origin.
                    If you set your own minimum and maximum values, any data
                    points outside the range will be clipped to the range of the
                    axis.

                    Normally IntelliGraph calculates the best way to place tick
                    marks based on the axis range and the amount of screen space
                    available. You can force the tick interval to a specific
                    value with the nTick parameter. To have IntelliGraph
                    calculate the best value for you, pass AUTO for this
                    parameter.

                    Let's customize our graph from the previous example with the
                    axis style and scaling functions:








                                                                 18



                                              Learning IntelliGraph





                      LOCAL nHandle
                      LOCAL aData := { { 27, 53, 37 }, { 44, 12, 69 } }
                      LOCAL aLabels := { "April", "May", "June" }
                      LOCAL aLegends := { "Red Widgets", "Blue Widgets" }
                      LOCAL aColors := { RED, BLUE }

                        nHandle := IGNew()

                        IGAmp(aData)

                        IGLabels(aLabels)
                        IGLegends(aLegends)

                        IGTitleG("Quarterly Report")
                        IGTitleX("Month")
                        IGTitleY("Units sold")

                        IGColors(aColors)
                        IGPatterns({14, 15})

                        IGXAxisStyle(AS_NOTICKS)
                        IGYAxisStyle(AS_GRID)

                        IGYAxisScale(0, 0, 100, AUTO)

                        IGShow(IGBAR2D)

                        INKEY(0)
                        IGDelete(nHandle)


                    This code produces the following graph:





















                                                                 19



                                              Learning IntelliGraph




        Figure 2.6


















                    Let's look at the three new lines and their effect on the
                    graph:

                      IGXAxisStyle(AS_NOTICKS) changes the style for the X axis
                      so that no tick marks are displayed.

                      IGYAxisStyle(AS_GRID) specifies that a grid line be drawn
                      at every tick interval on the Y axis.

                      IGYAxisScale(0, 0, 100, AUTO) overrides the Y axis
                      scaling so that the axis extends from 0 to 100. We've
                      left the origin at its default of 0. By passing AUTO for
                      nTick, we're letting IntelliGraph determine the best tick
                      interval.


     Summary

                    This tutorial has familiarized you with the basic aspects of
                    using IntelliGraph, but there are still a lot of features
                    left to cover. The next chapter, Using IntelliGraph, covers
                    graphing in more detail. If you want to fully utilize
                    IntelliGraph, read on!












                                                                 20








                                                              Using IntelliGraph



                      This chapter assumes that you have read the tutorial part
                      of this manual to get an overview of IntelliGraph's
                      philosophy, capabilities, and terminology.


       IntelliGraph work areas

                  An  Every graph has to be associated with an IntelliGraph
        IntelliGraph  work area. A work area is simply a way to work with more
        work area is  than one graph at a time.
        analogous to
           a Clipper  Three IntelliGraph functions allow you to manage work
          work area.  areas:
          You decide
         which graph
         is in which                Function  Definition
        IntelliGraph                IGNew     Creates a new work
          work area,                          area
         just as you                IGSelect  Switches to an
        decide which                          existing work area
            database                IGDelete  Deletes an existing
        files are in                          work area
       which Clipper
          work area.
                      IGNew() creates a new work area, makes it active, and
                      returns a numeric handle to the created work area. Each
                      work area has a unique handle associated with it. You can
                      select among work areas by passing their handle to the
                      IGSelect() function.

                      When you are done using a work area, it can be deleted
                      with IGDelete(). All graph data passed to IntelliGraph
                      for that work area will be lost. When a work area is
                      deleted, it frees the memory occupied by the graph.


       The active work area

                      The latest work area created with IGNew() or selected
                      with IGSelect() is always the currently active work area.
                      You must have a work area active before you can call any
                      IntelliGraph functions other than IGNew(), IGSelect(),
                      and IGDelete().







                                                                    21



                                                    Using IntelliGraph


                      When a work area is active, all new graph data is
                      associated only with the graph in that work area. This
                      means that the values passed with IGAmp() will only be
                      used by the graph in the current work area. The current
                      work area will remain active until you delete it, select
                      or create another work area.

                 *    If you have no need to work with more than one graph
                      concurrently in your application, it is possible for you
                      to create all your graphs in a single work area. Create
                      the work area when your application starts, and delete it
                      before exiting.


       Storing data

                      Data for your graph must be passed before IntelliGraph
                      can draw the graph for you. This is done with



                         IGAmp(aData)


                      where aData is a two dimensional array containing the
                      specific values for each data point. IntelliGraph
                      determines the number of groups and points per group from
                      the array. The first dimension of the array determines
                      the number of groups, and the second dimension determines
                      the number of points.

                      In Clipper, you can create a multi-dimensional array by
                      dimensioning it, calling the ARRAY() function, or by
                      nesting arrays. For example, the following lines of code
                      each create an array of the same size:



                         LOCAL aData1[2, 3]
                         LOCAL aData2 := ARRAY(2, 3)
                         LOCAL aData3 := {{1, 5, 9}, {2, 4, 8}}



       Limits on internal storage

                      IntelliGraph stores the that data you pass it in an
                      internal array, so you are free to discard or modify your
                      original data. The internal array represents each value
                      as a double precision floating point number, and the
                      entire array must fit within a 64K segment. At 8 bytes
                      per value, this means that there is a theoretical limit
                      of 8192 total data points.



                                                                    22



                                                    Using IntelliGraph


                      The total number of points is the product of the number
                      of groups and the number of points per group. Therefore,
                      the limits on groups and points per group are inversely
                      related as shown:


                                         Groups  Points per
                                                    group
                                           1        8192
                                           2        4096
                                           4        2048
                                           8        1024
                                           16        512
                                           32        256
                                           64        128




       Data groups

                      Each data group represents a collection of one or more
                      data points that share a similar property. Each group
                      within a graph is usually represented by a unique color,
                      pattern or symbol. The graph legend provides text labels
                      for each group. Data within a group usually comes from a
                      single source; data in different groups usually comes
                      from different sources.

                      The ordering of groups is usually not significant.
                      However, certain graph types require groups for specific
                      purposes. In Open-High-Low-Close graphs, the first group
                      defines the High values; the second defines the Low
                      values; the third the Close values; and the fourth the
                      Open values. In Gantt graphs, the first group represents
                      the time before each task starts; subsequent groups
                      represent task duration.


       Data points

                      The number of points represents the number of elements
                      within a group. Each element usually represents a
                      measurement at a specific point in time. For most graphs
                      the points are distributed evenly along the ordinal axis,
                      and are represented by a single legend callout. The order
                      of data points in a group is significant.









                                                                    23



                                                    Using IntelliGraph


       A data example

                      To better understand how IntelliGraph expects to see data
                      organized, let's look at the process of storing data for
                      an example graph. Suppose we need to graph the following
                      precipitation data:


                                         Jan  Feb  Mar  Apr  May  Jun


                                 New     1.4  0.8  9.6  8.1  2.3  3.8
                                 York

                                 Seattle 4.3  5.4  7.5  12.4 3.2  4.3



                      In this example, the data for each city represents a
                      group, and the data for each of the months represents the
                      points within the groups. Hence, there are two groups,
                      and 6 points in each group.

                      The following lines of code will create the array for
                      this data and pass it to IntelliGraph.



                         LOCAL aData[2, 6]
                           aData[1] := {1.4, 0.8, 9.6, 8.1, 2.3, 3.8}
                           aData[2] := {4.3, 5.4, 7.5, 12.4, 3.2, 4.3}
                           IGAmp(aData)


                      Depending on the type of graph we are drawing,
                      IntelliGraph will interpret this data in the following
                      ways:


                           Graph type  Result

                           Bar graph   Twelve bars would be shown: 6 for the
                                       first group, and 6 for the second
				       group.

                           Gantt       The first group would be interpreted
                           graph       as the bar offset from the axis, and
				       the second group of data would
				       represent the actual bars. Therefore,
				       six bars of one segment each would be
				       drawn.

                           Line graph  Two lines, with six points per line.



	                                            24



                                                    Using IntelliGraph


                           Area graph  Two filled-in areas, six points per
                                       area.

                           OHLC graph  The first data group would represent
                                       the High values, and the second the
                                       Low. This data would produce six
                                       High-Low bars.


       Displaying a graph

                      IntelliGraph will store up all information passed to it
                      without actually drawing a graph. To see the graph, you
                      need to call



                         IGShow(nGType [, nStyle])


        The specific  nGType is the type of graph to be drawn, be it bar, pie,
         options for  line etc. Each type of graph has a number of styles. The
         nGType, and  style of a particular graph type is chosen with the
       nStyle can be  second parameter, nStyle.
        found in the
             Library  The type of graph is not defined until it is time to draw
           Reference  the graph. This means that you can store up all the graph
               under  data with IGAmp(). Then you draw the graph with a call to
         IGShow() on  IGShow(). If you want, you can show the same data in a
             page 58  different graph type with another call to IGShow() in
                      your very next line of code.

                      For example, suppose you have stored up all your graph
                      information with IGAmp(). You decide to show the graph as
                      a 2D bar graph with a call to


                         IGShow(IGBAR2D)


                      If you want to see the same data in a line graph, all you
                      need to do is call IGShow() with a different nGType
                      parameter:


                         IGShow(IGLINE)










	                                                            25



                                                    Using IntelliGraph


       Graph types

                      Here's a visual list of all the basic graph types
                      supported by IntelliGraph, and a description of their
                      use. Also, many of the graphs have style options which
                      can alter the way they present data.

                                IGBAR2D       The vertical bar graph,
                                              sometimes called a column
                                              chart, shows the comparative
                                              size of quantities. The
                                              horizontal progression of
                                              bars suggests the passage of
                                              time, which allows this
                                              graph to show trends.


                                IGHBAR2D      The horizontal bar graph
                                              shows the comparative size
                                              of quantities. Unlike the
                                              vertical bar graph, this
                                              graph is best for comparing
                                              amounts when you do not want
                                              to show trends.



                                 IGLINE       The line graph shows the
                                              progression of one or more
                                              variables over time.







                                 IGHLC        The Open-High-Low-Close
                                              graph is traditionally used
                                              to represent prices of stock
                                              in a day of trading. The
                                              height of the bar represents
                                              the day's highest and lowest
                                              prices. A tick mark on the
                                              left of the bar indicates
                                              the open price, and a tick
                                              mark on the right indicates
                                              the closing price.








                                                                    26



                                                    Using IntelliGraph


                                IGGANTT       The Gantt graph is a
                                              horizontal graph that is
                                              used to provide a graphic
                                              view of a schedule. Each bar
                                              in the graph represents a
                                              task. The horizontal
                                              position of the bar
                                              indicates the tasks start
                                              time, and the length of the
                                              bar represents the length of
                                              the task.

                                 IGAREA       The area graph portrays the
                                              relative size of quantities
                                              over time. The data is
                                              summed, so the graph also
                                              indicates trends in the
                                              total. It is most useful for
                                              showing trends in the
                                              relationship of parts to a
                                              whole.


       Special data values

                      Normally, the data you give to IntelliGraph is used just
                      as it is passed. Certain data values, however, are
                      treated specially.


       Negative values

                      IntelliGraph can deal with negative values on all but a
                      few types of graphs. In graphs that represent summed
                      data, such as an area graph, negative values are
                      meaningless. In these graphs, IntelliGraph will treat
                      negative values as if they are 0.

                      The graphs that cannot meaningfully handle negative
                      values are:

                         Area graphs (except absolute area graphs)

                         Gantt graphs

                         Stacked bar graphs










                                                                    27



                                                    Using IntelliGraph


       Missing data

                      Occasionally, the data you are graphing will be
                      incomplete. In this case, you need to display the data
                      that is available, incomplete though it may be.
                      Surprisingly, almost no commercial graphing products can
                      handle this type of need.

       Store missing  IntelliGraph can easily deal with missing data values for
         data points  all graph types. To indicate that a value is missing,
           as NIL to  store it as NIL. IntelliGraph will not draw any graph
                have  representation for NIL data points.
        IntelliGraph
            not draw  For line graphs, the lines will appear discontinuous,
               them.  stopping at the point before and starting at the point
                      after the missing value.


       Scaling

                      IntelliGraph scales your data dynamically as it is drawn.
                      It does not modify the data you have stored with IGAmp().

                      Four variables control IntelliGraph's scaling for each
                      axis, and each can be set by calling IGXAxisScale() or
                      IGYAxisScale():


                                        Parameter Default value
                                        nOrigin        0
                                        nMin          AUTO
                                        nMax          AUTO
                                        nTick         AUTO


                      The scaling variables only affect the axis when it is
                      numeric, i.e., representing numeric data. When the axis
                      is ordinal, i.e., representing ordered data, you cannot
                      apply any scaling to the axis.


       Origin

                      The parameter nOrigin allows you to specify the origin of
                      the axis. The origin, which is 0 by default, is simply
                      the point along the axis at which the two axes intersect.
                      The origin is guaranteed to always be present in the axis
                      range, which means that even if your data is all in the
                      range of 90-100, but your origin is 0, the axis will
                      include the range 0-100.





                                                                    28



                                                    Using IntelliGraph


                      The default of 0 makes sense for most types of graphs,
                      such as bar or area graphs, which compare the magnitude
                      of values. However, if the data range you are graphing is
                      very small and not centered on 0, you may wish to zoom in
                      on the actual range of data.

                      For example, if you are graphing human body temperature,
                      all your data may range from 90o to 110o. In this case,
                      you probably want the range on your axis to extend from
                      90 to 110, not 0 to 110.

                      To allow the origin to `float', set the value of nOrigin
                      to AUTO. The origin will take the value closest to 0 that
                      it can, without exceeding the minimum or maximum.


       Min and max

                      nMin and nMax are the axis minimum and maximum
                      respectively. By default, IntelliGraph calculates these
                      from your data, so that the range includes all the data
                      points and the origin.

                      Any values you specify for nMin and nMax are starting
                      points, not absolutes. IntelliGraph may adjust the
                      minimum and maximum downward and upward to account for
                      other variables, such as the origin or tick interval.

                      Certain graph types, such as percentage bar and
                      percentage area, calculate the minimum and maximum values
                      differently. In these graphs, the minimum and maximum are
                      set to 0 and 100, respectively. However, you can still
                      specify your own range by setting nMin and nMax.


       Tick interval

                      The numeric axis is divided evenly into ranges for the
                      purpose of placing labels and tick marks. The tick marks
                      (or grid lines) act as visual cues to the value of the
                      data being presented. The range in data coordinates
                      between tick marks is called the tick interval.

                      By default, IntelliGraph automatically calculates the
                      best tick interval based on the axis range and the amount
                      of screen space available to place tick marks. The height
                      of the label font is used in determining how much screen
                      space to use between ticks. IntelliGraph always creates
                      tick intervals with a most significant digit of 1, 2, or
                      5.






                                                                    29



                                                    Using IntelliGraph


                      You can force the tick interval to a specific value with
                      the nTick parameter of IGXAxisScale() or IGYAxisScale().
                      If you supply a tick interval, try to use values which
                      divide evenly into powers of 10. For example, .025 would
                      work well as a tick interval, but .03 would not.


       The scaling process

                      Here's how IntelliGraph determines what values to use for
                      scaling and displaying your data:

                      1. It scans through all the amplitude data to find the
                         minimum and maximum data values. If the graph type
                         represents summed data, it uses the sums to find the
                         minimum and maximum. If the graph type represents
                         percentage data, it sets in minimum and maximum to 0
                         and 100.

                      2. If nMin is not AUTO, it sets the minimum to the value
                         specified.

                      3. If nMax is not AUTO, it sets the maximum to the value
                         specified.

                      4. If nOrigin is not AUTO, it adjusts the minimum or
                         maximum to include the origin.

                      5. If nTick us AUTO, it calculates the tick interval based
                         on the range between the minimum and maximum.
                         Otherwise, it assigns the value specified to the tick
                         interval.

                      6. The minimum and maximum are expanded so that they fall
                         on even multiples of the tick interval.

                      7. If nOrigin is AUTO, it sets the origin to the value
                         closest to 0 within the axis range.


       Data clipping

                      Normally, all your data will be visible in the graph. If
                      you store your own values for nMin or nMax, some of the
                      data may be outside the range of the axis. In this case,
                      IntelliGraph will clip the graph data to the range of the
                      axis.

                      Because of the way that IntelliGraph draws many graphic
                      elements, it should be obvious when your data is being
                      clipped, as illustrated in Figure 3.7.





                                                                    30



                                                    Using IntelliGraph


          Figure 3.7
           A clipped
          line graph














       Getting graph information

                This  IntelliGraph can tell you the values it has calculated
         information  for the coordinates and lengths of the graph's axes.
       is valid only  Using this information, you can place additional
           after the  graphical objects within the graph window, correctly
            graph is  scaled and positioned with respect to the original graph.
          drawn with
        IGShow() and  To get this information, call IGInfo(nIndex) with nIndex
          before you  set to one of the following values:
                 use
          IGClose().
                                    Index      Returns
                                    INFO_XMIN  X axis minimum
                                               value
                                    INFO_YMIN  Y axis minimum
                                               value
                                    INFO_XMAX  X axis maximum
                                               value
                                    INFO_YMAX  Y axis maximum
                                               value
                                    INFO_XORG  X origin of graph
                                               in screen units
                                    INFO_YORG  Y origin of graph
                                               in screen units
                                    INFO_XLEN  X axis length in
                                               screen units
                                    INFO_YLEN  Y axis length in
                                               screen units


                      You can use IGInfo() to calculate some useful values. For
                      example, the Y scaling factor used on your data by
                      IntelliGraph is





                                                                    31



                                                    Using IntelliGraph


                                            IGInfo(INFO_YLEN)
				  -------------------------------------
                                  IGInfo(INFO_YMAX) - IGInfo(INFO_YMIN)

                      You could use this to manually scale a new set of data
                      and superimpose another graph on top of the one already
                      drawn.


       Font usage

                      IntelliGraph automatically chooses fonts based on the
                      current video resolution. Because dGE does not have a
                      resolution independent method of dealing with fonts,
                      IntelliGraph comes with its own set of proportional
                      fonts.

                      Eight fonts are supplied each each possible display
                      resolution. The fonts should appear the same size
                      onscreen, regardless of which mode your display is in. A
                      symbol font is used to display icons in line and scatter
                      graphs. The legend text, label text, and axis titles are
                      displayed in a san serif system font. The graph title is
                      displayed in a Times font.


                             Mode     Symbol     System font  Times font
                                      font

                             320x200  IGSYMA.PTX IGSYSA10.PTX IGTIMA30.PTX
                                                 IGSYSA12.PTX
                                                 IGSYSA14.PTX
                                                 IGSYSA16.PTX
                                                 IGSYSA18.PTX
                                                 IGSYSA20.PTX

                             640x200  IGSYMB.PTX IGSYSB10.PTX IGTIMB30.PTX
                                                 IGSYSB12.PTX
                                                 IGSYSB14.PTX
                                                 IGSYSB16.PTX
                                                 IGSYSB18.PTX
                                                 IGSYSB20.PTX














                                                                    32



                                                    Using IntelliGraph


                             640x350  IGSYMC.PTX IGSYSC10.PTX IGTIMC30.PTX
                                                 IGSYSC12.PTX
                                                 IGSYSC14.PTX
                                                 IGSYSC16.PTX
                                                 IGSYSC18.PTX
                                                 IGSYSC20.PTX

                             640x480  IGSYMD.PTX IGSYSD10.PTX IGTIMD30.PTX
                                                 IGSYSD12.PTX
                                                 IGSYSD14.PTX
                                                 IGSYSD16.PTX
                                                 IGSYSD18.PTX
                                                 IGSYSD20.PTX

                             800x600  IGSYME.PTX IGSYSE10.PTX IGTIMF30.PTX
                                                 IGSYSE12.PTX
                                                 IGSYSE14.PTX
                                                 IGSYSE16.PTX
                                                 IGSYSE18.PTX
                                                 IGSYSE20.PTX

                             1024x768 IGSYMF.PTX IGSYSF10.PTX IGTIMF30.PTX
                                                 IGSYSF12.PTX
                                                 IGSYSF14.PTX
                                                 IGSYSF16.PTX
                                                 IGSYSF18.PTX
                                                 IGSYSF20.PTX





























	                                                            33



                                                    Using IntelliGraph


                      Because of the complexity of choosing fonts for display
                      and print, this usage of fonts is not a final solution,
                      and is likely to change in a future release of
                      IntelliGraph.


       IntelliGraph error handling

                      IntelliGraph is not only easy to use, it's easy to debug,
                      too. IntelliGraph reports all errors through Clipper's
                      error system, giving you the option of handling them how
                      you see fit. If you don't have your own error handler,
                      use the sample provided in source with dGE
                      ("DGEERROR.PRG") so you can be sure to catch errors in
                      graphics mode.

                      Here is a list of IntelliGraph error messages, what they
                      mean and possible causes.

                      Error Description    Explanation
		      Code

                      2001 No IntelliGraph This error means that you have
                           object in       tried to call IntelliGraph
                           context         functions without first
                                           defining an IntelliGraph work
                                           area. Define a work area by
                                           calling IGNew().

                      2002 Bad graph       If you try to select an
                           handle          invalid graph handle with
					   IGSelect(), this error will
					   result. For example, calling
					   IGSelect(2000) in any of the
					   sample programs would cause
					   this error, since you
					   obviously don't have 2000
					   graph areas open!

                      2003 Invalid         IGShow() will return this
                           graph type      error when the graph type you
					   specify doesn't match any of
					   the valid IntelliGraph types.
					   IGShow(200) would cause this
					   error as there is no graph ID
					   of 200. To see the valid
					   numbers, see IGRAPH.CH or
					   better yet, just use the
					   #DEFINES.







                                                                    34



                                                    Using IntelliGraph


                      2004 Feature only    If you are holding the manual,
                           available in    you should never see this
                           registered      error unless you are linking
                           version         in the shareware library. The
                                           shareware library only has
                                           line and bar graphs available,
					   so any attempt to select
					   another graph type -- like
					   IGAREA -- will cause this error.

                      2005 Incorrect       You have too many or too few
                           number of       parameters in a function call.
                           parameters      for example, IGShow(IGAREA,0)
					   would be perfectly acceptable
					   while IGShow(IGAREA,0,3) would
					   cause this error, as there is
					   no third parameter to
					   IGShow().

                      2006 Argument type   This error occurs when a data
                           mismatch        type that IntelliGraph doesn't
                                           expect is passed. IGSelect(),
					   for example, expects a numeric
					   value passed to it
					   corresponding to a valid
					   IntelliGraph work area. If a
					   string is passed to
					   IGSelect(), like
					   IGSelect("Hello"), this error
					   will result.

                      2007 Inconsistent    IntelliGraph calculates the
                           array size      number of points and number of
                                           groups from the array passed
					   to IGAmp(). If you define an
					   array:
					   aData := {{3, 4, 5} , {1, 2}}
					   IntelliGraph cannot determine
					   what the point and group count
					   is and will display this
					   error. The array
					   aData := {{3, 4, 5} , {1, 2,
					   5}}
					   would work correctly, as the
					   same number of points are in
					   each group.










                                                                    35



                                                    Using IntelliGraph


                      2008 Unable to       IntelliGraph has made a
                           allocate        request to the Clipper VM
                           VM block        system for a block of virtual
					   memory, and Clipper has
					   returned an error. This
					   indicates the program, and
					   possibly your entire system,
					   has now become unstable and
					   should be rebooted.
					   Unfortunately, many things can
					   cause VM errors and the cause
					   of the error may be very
					   difficult to determine and may
					   not have anything to do with
					   IntelliGraph, or even Clipper,
					   at all. Things to try:
					   1. Free up more memory before
					   starting the program;
					   2. Boot from a clean disk to
					   see if a TSR is interfering
					   with Clipper;
					   3. Link with a protected mode
					   linker;
					   4. Make sure you have the
					   latest version of Clipper.

                      2009 Unable to lock  IntelliGraph has made a
                           VM block        request to the Clipper VM
                           block           system to lock a block of
					   virtual memory, and Clipper
					   has returned an error. See
					   above.

                      2010 Too few points  Line graphs need at least two
                           for graph type  points to graph. If you only
					   pass one point, this error
					   will result.

                      2011 Too many/few    Open-High-Low-Close graphs
                           groups for      need at least two groups to
                           graph type      display (the High group and
					   the Low group). If only one
					   group if data is passed, this
					   error will result. You will
					   also get this error if you
					   pass five or more groups and
					   try to display an OHLC graph;
					   the maximum number of groups
					   it will take is 4.







                                                                    36



                                                    Using IntelliGraph


       Using bitmapped flags

                      Several IntelliGraph functions make use of bitmapped
                      flags for parameters. That is, they use the individual
                      bits of a byte or word to indicate different properties.
                      The individual bits are usually called flags since, by
                      being set (equal to 1) or cleared (equal to 0), they
                      indicate whether the designated property is activated.

                      For example, the nStyle parameter of IGXAxisStyle() is a
                      bitmap flag. If you look at the header file IGRAPH.CH,
                      you can see how some of the constants for axis style are
                      defined:



                         #define IGAS_GRID1
                         #define IGAS_NOLABELS 2
                         #define IGAS_NOTICKS  4


                      Each of these constants has a different bit set. To
                      combine properties, we need to combine the bit flags. In
                      C, Pascal, or assembly, we would combine the bits by
                      using the logical OR operator. Clipper has no such
                      logical operation.

          Do not add  Fortunately, we can manage by using addition. Addition
            the same  with bit fields works so long as we don't try to set a
           bitmapped  bit field more than once, as the binary addition would
           flag more  carry into the next bit.
          than once.
                      For example, if we made the following function call:


                         IGXAxisStyle(IGAS_GRID + IGAS_NOLABELS + IGAS_GRID)


                      The extra IGAS_GRID would cause the addition to overflow.
                      The result would be 4, the equivalent of IGAS_NOTICKS,
                      certainly not what we desired.


       Printing

                      IntelliGraph does not provide any specific support for
                      printing except through dGE. If you can display it on the
                      screen, you can print it.








                                                                    37



                                                    Using IntelliGraph


        Use the MONO  You may find your graphs will look better on a black and
        style option  white page if you use the MONO style option for the graph
       when printing  in IGShow(). With the MONO option set, IntelliGraph will
        to make your  automatically use patterns instead of colors for solid
               graph  areas, and symbols and solid lines instead of patterned
           distinct.  lines.

                      The MONO option is set by default in monochrome display
                      modes.


       Troubleshooting

                      This section is dedicated to answering common problems
                      that may arise while using IntelliGraph. If you can't
                      find a solution to your problem here, be sure to check
                      the README file for last minute release information.


       Compiling

                      When compiling, I get warnings like, "Warning C1003
                      Ambiguous reference: 'IGBAR2D'".

                      You are probably not including the IntelliGraph header
                      file. Make sure that the line:


                         #include "IGRAPH.CH"


                      appears in the beginning of your source code.


       Linking

                      When linking, I get lots of errors like, "'IGNEW' :
                      unresolved external"

                      You have probably forgotton to link IGRAPH.LIB into your
                      program. Add it to your linker command or link script.


       Running

                      My fonts all look the same.

                      IntelliGraph cannot find its fonts, and is using the
                      built in dGE font. Make sure that all the IntelliGraph
                      fonts for the modes you are using are in the current
                      directory. See the section on Font usage on page 32 for
                      more information.




                                                                    38



                                                    Using IntelliGraph


                      If fonts are all in the correct directory, and it seems
                      that IntelliGraph is just unable to switch fonts, you may
                      be running out of file handles.





















































                                                                    39

















                                                                          Part 2


                                                               Library Reference










































                                                                    41




                                                    Using IntelliGraph



       IGAmp

            Function  Store graph amplitude data.

              Syntax  IGAmp( aData )

         Description  Defines the number of points and groups in a graph and
                      transfers amplitude data to IntelliGraph.

                      Amplitude data is the primary data that is represented in
                      a graph. It determines the height of bars, offset of
                      points, etc. It is used by all graph types.

                      aData should be dimensioned so that the first dimension
                      represents the number of groups, and the second dimension
                      represents the number of points.

            See also  IGColors(), IGPatterns(), IGSymbols()

             Example

                         LOCAL i, j, aData[10, 10]
                         FOR i := 1 TO 10
                           FOR j := 1 to 10
                             aData[i, j] := Foobar(i, j)
                           NEXT
                         NEXT

                         nHandle := IGNew()
                         IGAmp(aData)
                         IGShow(IGBAR)
                         IGDelete(nHandle)























                                                                    43



                                                              IGColors


       IGColors

            Function  Passes an array of colors to IntelliGraph.

              Syntax  IGColors( aColors )

         Description  This function transfers color data to the current
                      IntelliGraph work area.

                      This function provides an easy way to customize your
                      IntelliGraph to whatever colors you wish. The use of
                      color data and the size of the array of color data you
                      will be passing depend on the type of graph to be
                      displayed. Refer to the following table for specifics.


                           Graph Type     Used for

                           Bar            Color of the bars for each data
                                          set

                           Gantt          Color of the bars for each data
                                          set

                           Line           Color of the line, symbols and
                                          sticks for each data set

                           Area           Color of the area of each data
                                          set

                           Open-High-     Color of the open-high-low-
                           Low-Close      close symbols


                      Use normal color values in the color array -- the values
                      can be found under the entry for SetRGBPal() in the dGE
                      Technical Reference. Specifying color data with this
                      function is optional. If this function is not called,
                      IntelliGraph will substitute its own color choices for
                      the current graph work area.

                      The same color data is used in the legend if one is
                      present.

            See also  IGAmp(), IGPatterns(), IGSColor(), IGSymbols()











                                                                    44



                                                              IGColors


             Example
                         aData := {{1, 5, 9}, {2, 4, 8}, {5, 4, 2}}
                         aColor := {3, 6, 9}
                         nHandle := IGNew()
                         IGAmp(aData)
                         IGColors(aColor)
                         /* The three colors used will be color 3 for data set
                            1 (cyan), color 6 for data set 2 (brown) and color
                            9 for data set 3 (light blue) */
                         IGShow(IGBAR2D)
                         IGDelete(nHandle)













































                                                                    45



                                                              IGDelete


       IGDelete

            Function  Deletes an IntelliGraph work area.

              Syntax  IGDelete( nArea )

         Description  This function deletes an existing IntelliGraph work area.
                      Any memory taken up by the data arrays stored for this
                      work area will be freed. Once a work area has been
                      deleted, it can no longer be selected nor can any new
                      data be passed to it.

            See also  IGNew(), IGSelect()

             Example

                         nHandle := IGNew()

                         // Now delete the graph work area
                         IGDelete(nHandle)




































                                                                    46



                                                                IGInfo


       IGInfo

            Function  Retrieve information about a graph.

              Syntax  IGInfo( nInfo ) -> nData

         Description  This function returns data on the current IntelliGraph
                      work area. The data returned gives you the ability to
                      overlay multiple graphs, interactively position graphs
                      depending on the data passed, or calculate positioning of
                      other graphs. nInfo is an index indicating the data you
                      wish to retrieve.


                             nInfo            Returns

                             INFO_XMIN        X axis minimum
                                              value
                             INFO_YMIN        Y axis minimum
                                              value
                             INFO_XMAX        X axis maximum
                                              value
                             INFO_YMAX        Y axis maximum
                                              value
                             INFO_XORG        X origin of graph
                                              in screen units
                             INFO_YORG        Y origin of graph
                                              in screen units
                             INFO_XLEN        X axis length in
                                              screen units
                             INFO_YLEN        Y axis length in
                                              screen units


                      The dGE coordinate system is documented in the dGE
                      Technical Reference manual under the SetVer() entry.

            See also  IGWindow(), IGXAxisScale(), IGYAxisScale()

             Returns  A numeric value corresponding to the index number passed
                      to the function and the currently selected graph work
                      area.

             Example  In the following example, the dGE SayString() command is
                      used to display all of the information about a graph
                      after the graph is put on the screen.










                                                                    47



                                                                IGInfo



                         #include "igraph.ch"
                         #define NSTR(x) ALLTRIM(STR(x))
                         LOCAL nHandle
                         LOCAL aData := {{1, 5, 9}, {2, 4, 8}}

                         SetHiRes(0)

                         nHandle := IGNew()
                         IGWindow(50, 50, 650, 1000)
                         IGAmp(aData)
                         IGShow(IGBAR2D)

                         INKEY(0)

                         SayString(700, 800, 0+4, 0+4, 15, ;
                           "x axis maximum value = " +
                         NSTR(IGInfo(INFO_XMAX)))
                         SayString(700, 800, 0+4, 0+4, 15, ;
                           "x axis minimum value = " +
                         NSTR(IGInfo(INFO_XMIN)))
                         SayString(700, 800, 0+4, 0+4, 15, ;
                           "y axis maximum value = " +
                         NSTR(IGInfo(INFO_YMAX)))
                         SayString(700, 800, 0+4, 0+4, 15, ;
                           "y axis minimum value = " +
                         NSTR(IGInfo(INFO_YMIN)))
                         SayString(700, 800, 0+4, 0+4, 15, ;
                           "x axis length = " + NSTR(IGInfo(INFO_XLEN)))
                         SayString(700, 800, 0+4, 0+4, 15, ;
                           "y axis length = " + NSTR(IGInfo(INFO_YLEN)))
                         SayString(700, 800, 0+4, 0+4, 15, ;
                           "X origin of graph = " + NSTR(IGInfo(INFO_XORG)))
                         SayString(700, 800, 0+4, 0+4, 15, ;
                           "Y origin of graph = " + NSTR(IGInfo(INFO_YORG)))

                         INKEY(0)
                         IGDelete(nHandle)

                         SetText()
















                                                                    48



                                                              IGLabels


       IGLabels

            Function  Pass label information to IntelliGraph.

              Syntax  IGLabels( aLabels )

         Description  This function defines an array of labels to be used in
                      labeling the independent axis of a graph (the axis
                      without numeric data). You can pass more labels than will
                      actually be displayed. If you have a graph with only 8
                      points and the label array is 12 elements, IntelliGraph
                      will use the first eight elements of the label array in
                      the graph.

            See also  IGLegends()

             Example

                         #include "igraph.ch"

                         LOCAL nHandle
                         LOCAL aData := {{1, 5, 9}, {2, 4, 8}}
                         LOCAL aLabels := {"Jan", "Feb"}

                         SetHiRes(0)
                         nHandle := IGNew()
                         IGWindow(50, 50, 650, 1000)
                         IGAmp(aData)

                         // add labels to the graph
                         IGLabels(aLabels)

                         IGShow(IGBAR2D)

                         INKEY(0)
                         IGDelete( nHandle )
                         SetText()



















                                                                    49



                                                             IGLegends


       IGLegends

            Function  Pass in legend information to IntelliGraph.

              Syntax  IGLegends( aLegends )

         Description  This function defines an array of labels to be used in
                      the graph legend. You can pass more legends than will
                      actually be displayed. If you have a graph with only 3
                      data sets and the legend array is 12 elements,
                      IntelliGraph will use the first eight elements of the
                      legend array in the graph. If your legend label is long,
                      don't worry about it going off the screen; IntelliGraph
                      will wrap the legend text for you.

            See also  IGLabels(), IGLegendStyle()

             Example

                         #include "igraph.ch"

                         LOCAL nHandle
                         LOCAL aData := {{1, 5, 9}, {2, 4, 8}, {4, 2, 3}}
                         LOCAL aLegend := {"East", "West", "Central"}

                         SetHiRes(0)

                         nHandle := IGNew()
                         IGWindow(50, 50, 650, 1000)
                         IGAmp( aData )

                         // add a legend to the graph
                         IGLegends(aLegend)

                         IGShow(IGBAR2D)

                         INKEY(0)
                         IGDelete(nHandle)
                         SetText()

















                                                                    50



                                                         IGLegendStyle


       IGLegendStyle

            Function  Set the drawing style for the legends.

              Syntax  IGLegendStyle( nStyle )

         Description  This function defines the style for the legend of the
                      current graph work area.

                      The parameter nStyle determines the drawing style as
                      defined by on or more of the following:


                               nStyle        Action

                               LS_COLORTEXT  Draw the legend text in
                                             the groupo color


                      There is currently only on option for nStyle. Future
                      options will allow legend positioning.

            See also  IGLegends()

































                                                                    51



                                                                 IGNew


       IGNew

            Function  Creates a new IntelliGraph work area.

              Syntax  IGNew() -> nArea

         Description  This function initializes a new IntelliGraph work area.
                      Once initialized, other IntelliGraph functions can be
                      called to store data, select attributes, or display your
                      graph.

                      IGNew() can be called multiple times to set up multiple
                      graphs in your application by capturing the value
                      returned from each new IGNew() function call. In the
                      following example, three graphs are created, placed on
                      the screen, and then the second one is erased and then
                      redrawn in a different orientation.

             Returns  A numeric handle to the IntelliGraph area just created.
                      The handle can be used as an argument to IGSelect() or
                      IGDelete().

            See also  IGSelect(), IGDelete()

































                                                                    52



                                                                 IGNew


             Example
                         #include "igraph.ch"

                         LOCAL nHandle1, nHandle2, nHandle3
                         LOCAL aData1 := {{1, 5, 9}, {2, 4, 8}}
                         LOCAL aData2 := {{3, 5, 2}, {4, 8, 2}}
                         LOCAL aData3 := {{8, 4, 7}, {2, 5, 3}}

                         SetHiRes(0)

                         // draw graph 1
                         nHandle1 := IGNew()
                         IGWindow(50, 650, 350, 1000)
                         IGAmp(aData1)
                         IGShow(IGBAR2D)

                         // draw graph 2
                         nHandle2 := IGNew()
                         IGWindow(400, 650, 700, 1000)
                         IGAmp(aData2)
                         IGShow(IGBAR2D)

                         // draw graph 3
                         nHandle3 := IGNew()
                         IGWindow(50, 50, 350, 400)
                         IGAmp(aData3)
                         IGShow(IGBAR2D)

                         INKEY(0)

                         // erase graph 2
                         BoxFill(400, 650, 700, 1000, 20, 0)

                         // select graph 2, change position and size, redraw
                         IGSelect(nHandle2)
                         IGWindow(400, 50, 700, 1000)
                         IGShow(IGBAR2D)

                         INKEY(0)
                         IGDelete(nHandle1)
                         IGDelete(nHandle2)
                         IGDelete(nHandle3)
                         SetText()













                                                                    53



                                                            IGPatterns


       IGPatterns

            Function  Pass in pattern information.

              Syntax  IGPatterns( aPatterns )

         Description  This function transfers pattern data to the current
                      IntelliGraph work area.

                      This function provides an easy way to customize your
                      IntelliGraph to display whatever patterns you wish. The
                      use of pattern data depends on the type of graph to be
                      displayed. Refer to the following table for specifics.


                             Graph Type     Used for
                             Bar            Pattern of the bars for each
                                            data set
                             Gantt          Pattern of the bars for each
                                            data set
                             Line           Line style of the line and
                                            sticks for each data set
                             Area           Fill pattern of the area of
                                            each data set
                             Open-High-     Pattern data is not used for
                             Low-Close      this graph type.


                      Use dGE's pattern values for fill patterns array -- the
                      values can be found in Appendix A of the dGE Technical
                      Reference.

                      For line patterns, IntelliGraph uses its own line styles,
                      since dGE does not support variable line styles. The
                      possible line styles are:


                                  Style       Result
                                  LS_SOLID
                                  LS_DASH
                                  LS_DOT
                                  LS_DASHDOT
                                  LS_DASHDOT
                                  DOT


                      Specifying pattern data with this function is optional.
                      If this function is not called, IntelliGraph will
                      substitute its own pattern choices for the current graph
                      work area. If the graph is in color, the default pattern
                      is solid. If the graph is monochrome, IntelliGraph picks
                      the patterns from dGE's pattern selection starting at
                      pattern 0 and continuing sequentially.



                                                                    54



                                                            IGPatterns


                      The same pattern data is used in the legend if one is
                      present.

            See also  IGAmp(), IGColors(), IGSymbols()

             Example

                         LOCAL nHandle
                         LOCAL aData := {{1, 5, 9}, {2, 4, 8}}
                         LOCAL aPatterns := {3, 6}

                         nHandle := IGNew()
                         IGAmp(aData)

                         /* The two patterns used will be pattern 3 for data
                            group 1 and pattern 6 for data group 2 */
                         IGPatterns(aPatterns)

                         IGShow(IGLINE)
                         IGDelete(nHandle)




































                                                                    55



                                                              IGSColor


       IGSColor

            Function  Set the color for graph text, axes, and grids.

              Syntax  IGSColor( nColor )

         Description  This function selects the color data to be used for the
                      graph text, axes and grids. Use normal color values -- they
                      can be found under the entry for SetRGBPal() in the dGE
                      Technical Reference.

                      Specifying a color with this function is optional. If
                      this function is not called, IntelliGraph will substitute
                      its own color choice for the text, axes and grids in the
                      current graph work area.

            See also  IGColors()

             Example

                         LOCAL nHandle
                         LOCAL aData1 := {{1, 5, 9}, {2, 4, 8}}

                         nHandle1 := IGNew()
                         IGAmp(aData1)

                         // set grids, labels and axes to light blue
                         IGSColor(HIBLUE)

                         IGShow(IGBAR2D)
                         IGDelete( nHandle )

























                                                                    56



                                                              IGSelect


       IGSelect

            Function  Set the specified IG area as current.

              Syntax  IGSelect( nArea )

         Description  This function selects an existing IntelliGraph work area.
                      Once selected, other IntelliGraph functions to adjust
                      scaling, zooming, placement, labeling and so forth can be
                      called to modify the existing data in that work area. The
                      data itself can be modified if you wish, while keeping
                      the graph positioning and attributes intact.

                      When the graph attributes have been modified to your
                      satisfaction, IGShow() must be called to redisplay the
                      graph. The dGE function BoxFill(), documented in your dGE
                      manual, is useful to erase the existing graph on the
                      screen before displaying the new one.

            See also  IGNew(), IGDelete()

             Example

                         nHandle1 := IGNew()
                         nHandle2 := IGNew()

                         // select first graph
                         IGSelect(nHandle1)


                      Also see example under the IGNew() entry

























                                                                    57



                                                                IGShow


       IGShow

              Syntax  IGShow( nType [, nStyle] )

            Function  Display a graph.

         Description  This function is the heart of IntelliGraph. All of the
                      information passed -- labels, legends, the data -- is
                      displayed to the screen with this function. The first
                      parameter, nType, defines the type of graph that you want
                      to show as shown in the following chart.


                                    nType     Graph Type
                                    IGBAR2D   2-D bar graph

                                    IGHBAR2D  2-D horizontal
                                              bar graph
                                    IGGANTT   2-D Gantt graph

                                    IGLINE    Line graph
                                    IGAREA    Area graph
                                    IGHLC     Open-High-Low-
                                              Close graph


                      The optional parameter, nStyle, determines the style of
                      the graph to be shown. The options available depend on
                      the graph type selected, as shown in the following
                      tables.


       Bar Graph


                      nStyle                Action
                      IGBAR_STACK           Draw stacked bar
					    graph
                      IGBAR_STACKPERCENT    Draw stacked
                                            percentile bar graph
                      IGBAR_NOSPACE         No space between
					    adjacent bars
                      IGBAR_MONO            Monochrome output
					    device


       Line Graph


                      nStyle            Action
                      IGLINE_SOLID      Join points with
                                        solid lines
                      IGLINE_SYMBOLS    Draw symbol at
                                        each point


                                                                    58



                                                                IGShow


                      IGLINE_STICK      Draw vertical
                                        sticks to points
                      IGLINE_PATTERN    Use patterned
                                        lines
                      IGLINE_THICK      Use thick lines

                      IGLINE_MONO       Monochrome output
					device


       Open-High-Low-Close Graph


                      nStyle            Action
                      IGHLC_THICK       Use thick lines to
                                        draw OHLC symbol
                      IGHLC_NOBARS      Do not draw any bars

                      IGHLC_NOCLOSE     Do not draw close bar

                      IGHLC_NOOPEN      Do not draw open bar

                      IGHLC_MONO        Monochrome output
					device


       Gantt Graph


                      nStyle            Action
                      IGGANTT_NOSPACE   No space between
                                        adjacent bars
                      IGGANTT_MONO      Monochrome output
                                        device


       Area Graph


                      nStyle            Action
                      IGAREA_PERCENT    Draw percentile
                                        area graph
                      IGAREA_ABSOLUTE   Amplitude data
                                        is absolute
                      IGAREA_MONO       Monochrome
					output device



            See also  IGAmp(), IGDelete(), IGNew(), IGSelect()






                                                                    59



                                                                IGShow


             Example
                         LOCAL nHandle
                         LOCAL aData := {{1, 5, 9}, {2, 4, 8}}
                         LOCAL aPatterns := {3, 6}

                         nHandle := IGNew()
                         IGAmp(aData)

                         // display a monochrome stacked 2-D bar graph
                         IGShow(IGBAR2D, IGBAR_STACK + IGBAR_MONO)

                         IGDelete(nHandle)












































                                                                    60



                                                             IGSymbols


       IGSymbols

            Function  Stores graph symbol information.

              Syntax  IGSymbols( aSymbols )

         Description  This function transfer symbol data to the current
                      IntelliGraph work area.

                      Symbols are used to display individual data points in
                      line and scatter graphs.

                      Specifying symbol data with this function is optional. If
                      this function is not called, IntelliGraph will substitute
                      its own symbol choices in the current graph.

                      The same symbols are used in the legend is one is
                      present.

            See also  IGAmp(), IGColors(), IGPatterns()




































                                                                    61



                                                              IGTitleG


       IGTitleG

            Function  Sets the graph title.

              Syntax  IGTitleG( cTitle )

         Description  This function defines the title text that IntelliGraph
                      will use for the currently selected graph. The text will
                      be placed at the top of the graph window and centered. If
                      no text is specified through this function, there will be
                      no title drawn.

             Example

                         LOCAL nHandle
                         LOCAL aData := {{1, 5, 9}, {2, 4, 8}}

                         nHandle := IGNew()
                         IGAmp( aData )

                         IGTitleG( "Boo!" )

                         IGShow( IGBAR2D )
                         IGDelete( nHandle )
































                                                                    62



                                                              IGTitleX


       IGTitleX

            Function  Sets the x axis title.

              Syntax  IGTitleX( cTitle )

         Description  This function defines the text string to be used as the
                      title for the x axis. The string will be centered on the
                      graph (not the defined window). If no text string is
                      defined, there will be no label along the x axis.

                      This function can be very useful to describe the
                      independent axis of your graph. For example, if your
                      labels are "Jan", "Feb", "Mar", etc., a good string
                      to pass might be the year or quarter in which those
                      months fell.

             Example

                         LOCAL nHandle
                         LOCAL aData := {{1, 5, 9}, {2, 4, 8}}
                         LOCAL aLabels := {'Jan, 'Feb'}

                         nHandle := IGNew()
                         IGAmp(aData)
                         IGLabels(aLabels)

                         // this string will appear on the x axis
                         IGTitleX("1994 Earnings")

                         IGShow(IGBAR2D)
                         IGDelete(nHandle)
























                                                                    63



                                                              IGTitleY


       IGTitleY

            Function  Sets the y axis title.

              Syntax  IGTitleY( cTitle )

         Description  This function defines the text string to be used as the
                      title for the y axis. The string will be centered on the
                      right or left side of the graph (not the defined window).
                      If no text string is defined, there will be no label
                      along the y axis. Your label can be long, even up to a
                      sentence, and IntelliGraph will automatically wrap it to
                      fit next to your graph.

                      This function can be very useful to describe the numeric
                      axis of your graph. For example, if your data ranges from
                      0 to 6,000,000, divide your values by one million (making
                      your Y labels 0 through 6) and then pass the string
                      "Numbers are in Millions" to IGTitleY(). It makes your
                      graphs look much cleaner.

             Example

                         LOCAL nHandle
                         LOCAL aData := {{1, 5, 9}, {2, 4, 8}}

                         nHandle := IGNew()
                         IGAmp(aData)

                         // This string will appear on the y axis
                         IGTitleY("Numbers in Millions")

                         IGShow(IGBAR2D)
                         IGDelete(nHandle)






















                                                                    64



                                                              IGWindow


       IGWindow

            Function  Sets the window size for the current area.

              Syntax  IGWindow( nX0, nY0, nX1, nY1 )

         Description  This function controls the area on the screen in which
                      the current graph will be displayed. By default, all
                      graphs will be displayed full screen. For a quarter
                      screen graph indexed to the lower left hand corner of the
                      screen, call the coordinates 0, 0, 675, 500. When a
                      window is defined with IGWindow(), you don't have to do
                      any scaling or recalculation; it's done for you
                      automatically.

             Example

                         LOCAL nHandle

                         nHandle1 := IGNew()

                         // graph will draw in the bottom corner of the
                         screen
                         IGWindow(0, 0, 675, 500)


                      Also see the example under the entry for IGNew.





























                                                                    65



                                                          IGXAxisScale


       IGXAxisScale

            Function  Set Y axis scaling parameters

              Syntax  IGXAxisScale( nOrigin, nMin, nMax, nMajorTick )

         Description  This function allows you to specify the values
                      IntelliGraph uses for scaling the X axis.

                      With any of the parameters for IGXAxisScale() you can
                      pass a special value, defined by the constant AUTO, to
                      have IntelliGraph calculate the value automatically.

                      The parameter nOrigin allows you to specify the origin of
                      the axis. The origin, which is 0 by default, is simply
                      the point along the axis at which the two axes intersect.

                      nMin and nMax are the axis minimum and maximum
                      respectively. By default, IntelliGraph calculates these
                      from your data, so that the range includes all the data
                      points and the origin. If you set your own minimum and
                      maximum values, any data points outside the range will be
                      clipped to the range of the axis.

                      Normally IntelliGraph calculates the best way to place
                      ticks marks based on the axis range and the amount of
                      screen space available. You can force the tick interval
                      to a specific value with the nMajorTick parameter. To
                      have IntelliGraph calculate the best value for you, pass
                      AUTO for this parameter.

            See also  IGXAxisStyle(), IGYAxisScale(), IGYAxisStyle()

             Example

                         LOCAL nHandle
                         LOCAL aData := {{1, 5, 9}, {2, 4, 8}}

                         nHandle := IGNew()
                         IGAmp(aData)

                         /* force the X axis to have a max of 25, with an origin
                            of 0 */
                         IGYAxisScale(0, AUTO, 25, AUTO)
                         IGShow(IGHBAR2D)
                         IGDelete(nHandle)










                                                                    66



                                                          IGXAxisStyle


       IGXAxisStyle

            Function  Set X axis style.

              Syntax  IGXAxisStyle( nStyle )

         Description  This function defines the style of the X axis for the
                      graph in the currently selected IntelliGraph work area.

                      The nStyle parameter is defined by adding together one or
                      more axis style constants:


                           Constant      Definition
                           AS_BOTTOM     Forces the X axis to appear at the
					 bottom of the graph
                           AS_GRID       Draws grid lines at every tick
					 interval
                           AS_NOLABELS   Prevents the display of the axis
					 labels
                           AS_NORMAL     Forces the axis to maintain normal
					 left to right order
                           AS_NOTICKS    Prevents the display of axis tick
					 marks
                           AS_ORIGIN     Forces the X axis to be drawn so that
					 it intersects the Y axis origin
                           AS_REVERSE    Reverses the left to right order of
					 the axis
                           AS_TOP        Forces the X axis to appear at the
					 top of the graph


                      The three location styles, AS_BOTTOM, AS_ORIGIN, and
                      AS_TOP, are all mutually exclusive. By default,
                      IntelliGraph places each axis so that it intersects the
                      other axis' origin.

                      The first parameter, nMode, determines the graph's axis
                      style, as defined by one or more of the following:

            See also  IGXAxisScale(), IGYAxisScale(), IGYAxisStyle()















                                                                    67



                                                          IGXAxisStyle


             Example
                         LOCAL nHandle
                         LOCAL aData := {{1, 5, 9}, {2, 4, 8}}

                         nHandle := IGNew()
                         IGAmp(aData)

                         /* force the x axis to the top of the graph and
                            reverse the order of the axis */
                         IGXAxisStyle(AS_TOP + AS_REVERSE)
                         IGShow(IGBAR2D)
                         IGDelete(nHandle)












































                                                                    68



                                                          IGYAxisScale


       IGYAxisScale

            Function  Set Y axis scaling parameters

              Syntax  IGYAxisScale( nOrigin, nMin, nMax, nMajorTick )

         Description  This function allows you to specify the values
                      IntelliGraph uses for scaling the Y axis.

                      With any of the parameters for IGYAxisScale   you can
                                                                 ()
                      pass a special value, defined by the constant AUTO, to
                      have IntelliGraph calculate the value automatically.

                      The parameter nOrigin allows you to specify the origin of
                      the axis. The origin, which is 0 by default, is simply
                      the point along the axis at which the two axes intersect.

                      nMin and nMax are the axis minimum and maximum
                      respectively. By default, IntelliGraph calculates these
                      from your data, so that the range includes all the data
                      points and the origin. If you set your own minimum and
                      maximum values, any data points outside the range will be
                      clipped to the range of the axis.

                      Normally IntelliGraph calculates the best way to place
                      ticks marks based on the axis range and the amount of
                      screen space available. You can force the tick interval
                      to a specific value with the nMajorTick parameter. To
                      have IntelliGraph calculate the best value for you, pass
                      AUTO for this parameter.

            See also  IGXAxisScale(), IGXAxisStyle(), IGYAxisStyle()

             Example

                         LOCAL nHandle
                         LOCAL aData := {{1, 5, 9}, {2, 4, 8}}

                         nHandle := IGNew()
                         IGAmp(aData)

                         /* force the Y axis to have a range of 0 - 50, with
                            ticks every 5 */
                         IGYAxisScale(AUTO, 0, 50, 5)
                         IGShow(IGBAR2D)
                         IGDelete(nHandle)










                                                                    69



                                                          IGYAxisStyle


       IGYAxisStyle

            Function  Set Y axis style.

              Syntax  IGYAxisStyle( nStyle )

         Description  This function defines the style of the Y axis for the
                      graph in the currently selected IntelliGraph work area.

                      The nStyle parameter is defined by adding together one or
                      more axis style constants:


                           Constant      Definition
                           AS_GRID       Draws grid lines at every tick
					 interval
                           AS_LEFT       Forces the Y axis to appear at the
					 left of the graph
                           AS_NOLABELS   Prevents the display of the axis
                                         labels
                           AS_NORMAL     Forces the axis to maintain normal
                                         bottom to top order
                           AS_NOTICKS    Prevents the display of axis tick
                                         marks
                           AS_ORIGIN     Forces the Y axis to be drawn so that
                                         it intersects the X axis origin
                           AS_REVERSE    Reverses the bottom to top order of
                                         the axis
                           AS_RIGHT      Forces the Y axis to appear at the
					 right of the graph


                      The three location styles, AS_LEFT, AS_ORIGIN, and
                      AS_RIGHT, are all mutually exclusive. By default,
                      IntelliGraph places each axis so that it intersects the
                      other axis' origin.

                      The first parameter, nMode, determines the graph's axis
                      style, as defined by one or more of the following:

            See also  IGXAxisScale(), IGXAxisStyle(), IGYAxisScale()















                                                                    70



                                                          IGYAxisStyle


             Example
                         LOCAL nHandle
                         LOCAL aData := {{1, 5, 9}, {2, 4, 8}}

                         nHandle := IGNew()
                         IGAmp(aData)

                         /* force the y axis to 20 ticks, put the axis on the
                            left of the graph and set the max value to 50 */
                         IGYAxisStyle(IGUTICKS + IGAXISLEFT, 20, 50, NIL)
                         IGShow(IGBAR2D)
                         IGDelete(nHandle)












































                                                                    71









                                                                           Index




                                                       33, 39, 40, 43, 44, 45,
                                 --A--                 48, 49, 50, 51, 54, 55,
                                                       56, 57, 58, 60, 61, 62,
                      Arrays, 9, 17, 22, 24, 33,       63
                       40, 44, 45, 49                IGColors, 15, 16, 17, 19,
                      AUTO, 18, 19, 20, 27, 28,        39, 40, 49, 51, 55
                       29, 60, 62                    IGDelete, 8, 9, 10, 12,
                                                       14, 16, 19, 21, 39, 40,
                                 --B--                 41, 43, 44, 45, 47, 48,
                                                       50, 51, 52, 54, 56, 57,
                      Blinker, 4                       58, 60, 61, 62, 63
                                                     IGInfo, 30, 42, 43
                                 --C---              IGLabels, 13, 14, 15, 16,
                                                       19, 44, 45, 57
                      Clipping, 18, 29, 30, 60,      IGLegends, 13, 14, 15, 16,
                       62                              19, 44, 45, 46
                      Colors, 15, 40                 IGNew, 8, 9, 10, 11, 14,
                      Constants                        16, 19, 21, 32, 39, 40,
                       manifest, 4, 7, 17, 34,         41, 43, 44, 45, 47, 48,
                         35, 61, 63                    50, 51, 52, 54, 56, 57,
                                                       58, 59, 60, 61, 62, 63
                                 --D--               IGPatterns, 15, 16, 17,
                                                       19, 39, 40, 49, 50, 55
                      dGE                            IGSelect, 9, 10, 11, 12,
                       standard functions, 3           21, 33, 41, 47, 48, 52,
                                                       54
                                 --E--               IGShow, 8, 9, 10, 11, 12,
                                                       14, 15, 16, 19, 24, 25,
                      Error handling, 4, 32, 33,       30, 33, 35, 39, 40, 43,
                       34                              44, 45, 48, 50, 51, 52,
                      Exo-Space, 4                     53, 54, 56, 57, 58, 60,
                                                       61, 62, 63
                                 --F--               IGSymbols, 15, 39, 40, 49,
                                                       55
                      Fonts, 31, 32, 36              IGTitleG, 13, 14, 15, 16,
                                                       19, 56
                                 --G--               IGTitleX, 13, 14, 15, 16,
                                                       19, 57
                      Grids, 12, 17, 20, 28, 51,     IGTitleY, 13, 14, 15, 16,
                       61, 63                          19, 58
                      Groups, 9, 15, 22, 23, 24,     IGWindow, 10, 11, 42, 43,
                       33, 34, 39                      44, 45, 48, 59
                                                     IGXAxisScale, 18, 27, 29,
                                 --I--                 42, 60, 61, 62, 63
                                                     IGXAxisStyle, 17, 19, 20,
                      IGAmp, 8, 9, 10, 11, 14,         34, 35, 60, 61, 62, 63
                       16, 19, 22, 24, 25, 27,


                                                                    73



                                                          IGYAxisStyle


                      IGYAxisScale, 18, 19, 20,                 --P--
                       27, 29, 42, 60, 61, 62,
                       63                            Patterns, 3, 15, 17, 23,
                      IGYAxisStyle, 17, 19, 20,        35, 49, 50
                       60, 61, 62, 63                Printing, ii, 35

                                 --L--                          --S--

                      Labels, 3, 9, 12, 13, 15,      Scaling, 3, 4, 12, 18, 20,
                       17, 23, 28, 44, 45, 51,         27, 29, 30, 52, 59, 60,
                       53, 57, 58, 61, 63              62
                      Legend, 12, 13, 15, 23,        Symbols, 12, 15, 23, 31,
                       31, 40, 45, 46, 49, 55          53, 54, 55
                      Limits, 3, 22
                      Linking, 5, 33, 36                        --T--

                                 --M--               Ticks, 12, 17, 18, 20, 26,
                                                       28, 29, 60, 61, 62, 63
                      Maximum, 18, 28, 29, 30,       Title
                       34, 42, 43, 60, 62              Axis, 12, 13, 57, 58
                      Minimum, 18, 28, 29, 30,         graph, 12, 13, 15, 31,
                       42, 43, 60, 62                   56
                      Missing data, 27
                      MONO, 35, 53, 54                          --V--

                                 --N--               VM, 34

                      Negative values, 27                       --W--
                      NIL values, 27, 63
                                                     Windows, 9, 10, 11, 30,
                                 --O--                 56, 57, 58, 59
                                                     Work areas, 8, 9, 11, 12,
                      Ordinal axis, 13, 15, 23,        21, 22, 32, 33, 40, 41,
                       27                              42, 46, 47, 49, 51, 52,
                      Origin, 17, 18, 20, 28,          55, 61, 63
                       29, 30, 42, 43, 60, 61,       Work areas, active, 21
                       62, 63



















                                                                    74

