Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Library for Clipper - <b>l_vbar()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                                 L_VBAR()


Syntax:        L_VBAR(<expN1>, <expN2>, <expN3>, <expN4>, <expN5>,
               <expN6>, <expN7>, <array1>, <expN8>, <expN9>, <array2>,
               <expN10>, [<array3>, <expN11>,...<array3+n>,
               <expN11+n>])


Purpose:       Draws vertical bar graph using specified data.


Arguments:     <expN1> is the x co-ordinate of the upper left corner
               of the graph.

               <expN2> is the y co-ordinate of the upper left corner
               of the graph.

               <expN3> is the x co-ordinate of the lower right corner
               of the graph.

               <expN4> is the y co-ordinate of the lower right corner
               of the graph.

               <expN5> is the distance between the edges of successive
               bars of the same colour (i.e. of the same data set).

               <expN6> is the width of a bar.

               <expN7> is the color code for the color of the axes.

               <array1> is the array of labels to be attached to the
               graph.

               <expN8> is the color code for the foreground color of
               the labels.

               <expN9> is the color code for the background color of
               the labels.

               <array2> is the first array of data elements to be
               graphed.

               <expN10> is the color code for the first set of bars.

               <array3> is the array containing the second set of data
               items.

               <expN11> is the color for the second set of data.

               <array3+n> is the nth array containing the last set of
               data items.

               <expN11+n> is the color code for the last set of data
               items.


Returns:       Nothing.


Usage:         Useful for the graphical representation of database
               information.


Examples:      DECLARE arr1[4]            && declare data array
               DECLARE lab[4]             && declare array of labels

               startx = 100               && x coord of top left of graph
               starty = 100               && y coord of top left
               endx = 250                 && x coord of bottom right
               endy = 450                 && y coord of bottom right
               gap = 15                   && gap between bar
               barwidth = 15              && width of bar
               colorbar = 3               && color of bars
               colorax  = 14              && color of axes
               fgd = 14                   && foreground color of labels
               bkgd = 4                   && background color of labels

               arr1[1] = 2.42             && assign values to
               arr1[2] = 6.085            && data elements
               arr1[3] = 6.378
               arr1[4] = 3.375

               lab[1] = "Mercury"         && assign values to
               lab[2] = "Venus"           && labels
               lab[3] = "Earth"
               lab[4] = "Mars"

               L_GMODE(16)                && set screen to mode 16
               L_TSIZE(1)                 && select medium text size
                                          && title of graph
               L_TEXT("Sample - Vertical Bar Graph",1,50,120,4,14)
                                          && draw graph
               L_VBAR(100,100,250,450,30,15,3,14,arr1,lab,14,4)


Language:      C

See Also: L_GMODE() L_HBAR() L_HSBAR() L_JUST() L_TEXT()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson