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


Syntax:        L_PIE(<array1>,<array2>,<array3>,<expN1>,
               <expN2>,<expN3>)


Purpose:       To draw a pie chart using specified data.


Arguments:     <array1> is an array of data elements to be graphed.

               <array2> is an array of color codes corresponding to
               the data elements in array1.

               <array3> is an array of labels to be attached to the
               pie chart.

               <expN1> is the x co-ordinate of the centre of the pie
               chart.

               <expN2> is the y co-ordinate of the centre of the pie
               chart.

               <expN3> is the radius of the pie chart.


Returns:       Nothing.


Usage:         Useful for graphical representation of data.


Examples:      DECLARE arr1[5]                  && declare data array
               DECLARE colors[5]                && declare array of colors
               DECLARE labels[5]                && declare array of labels

               xcentre=170                      && x coord of centre
               ycentre=320                      && y coord of centre
               radius=50                        && radius of chart

               arr1[1] = 25                     && assign values to
               arr1[2] = 12.5                   && data array elements
               arr1[3] = 12.5

               arr1[4] = 40
               arr1[5] = 10

               colors[1] = 1                    && assign colors
               colors[2] = 2
               colors[3] = 3
               colors[4] = 4
               colors[5] = 5

               labels[1] = "Monday"             && assign values to
               labels[2] = "Tuesday"            && labels
               labels[3] = "Wednesday"
               labels[4] = "Thursday"
               labels[5] = "Friday"

               L_GMODE(16)                 && set graphics mode and draw pie
               L_PIE(arr1,colors,labels,xcentre,ycentre,radius)


Language:      C

See Also: L_HBAR() L_HSBAR() L_LEGEND() L_STROKE() L_TEXT()

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