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_vsbar()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                                 L_VSBAR()


Syntax:        L_VSBAR(<expN1>, <expN2>, <expN3>, <expN4>, <expN5>,
               <expN6>, <expN7>, <array1>, <expN8>, <expN9>, <array2>,


               <expN10>, [<array3>, <expN11>,...<array3+n>,
               <array11+n>])


Purpose:       Draws vertical stacked bar graph with the 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.

               <expN6> is the width of a bar.

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

               <array1> is the array containing the labels for the
               bars of 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 array containing the first set of data
               items.

               <expN10> is the color code for the color by which
               <array2> data will be represented.

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

               <expN11> is the color code for the color by which
               <array3> data will be represented.

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

               <expN11+n> is the color code for the color by which
               <array3+n> data will be represented.


Returns:       Nothing.


Usage:         Useful for the graphical representation of database
               information.


Examples:      DECLARE arr1[5]            && declare first data array
               DECLARE arr2[5]            && declare second data array
               DECLARE arr3[5]            && declare third data array
               DECLARE arr4[5]            && declare fourth data array
               DECLARE lab[5]             && declare array of labels

               arr1[1] = 5                && assign values to
               arr1[2] = 10               && first data array
               arr1[3] = 15
               arr1[4] = 20
               arr1[5] = 25

               arr2[1] = 5                && assign values to
               arr2[2] = 10               && second data array
               arr2[3] = 12
               arr2[4] = 15
               arr2[5] = 15

               arr3[1] = 10               && assign values to
               arr3[2] = 15               && third data array
               arr3[3] = 15
               arr3[4] = 10
               arr3[5] = 15

               arr4[1] = 15               && assign values to
               arr4[2] = 10               && fourth data array
               arr4[3] = 15
               arr4[4] = 15
               arr4[5] = 10

               lab[1] = "New York"        && assign values to labels
               lab[2] = "London"
               lab[3] = "Tokyo"
               lab[4]= "Los Angeles"
               lab[5]= "Melbourne"

               L_GMODE(16)                && set screen to mode 16
               L_TSIZE(0)                 && set smallest text size

                                          && title of graph
               L_TEXT("Sample - Vertical Stacked Bar Graph",1,50,80,4,14)
                                          && draw graph
               L_VSBAR(100,50,250,400,20,20,3,lab,14,4,arr1,2,arr2,
                       14,arr3,4,arr4,6)


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