      !!! program pies


      INCLUDE 'STDHDR.FOR'
      INCLUDE 'GRAFTYPE.FOR'

      REAL xdata(0:maxr), rr
      INTEGER i,j
      CHARACTER * 80 titles(0:maxgroup)
      RECORD /GroupInfoRec/ piecolors(0:maxgroup)
      RECORD /explodeRec/ explode(0:maxgroup)

      CALL InitSEGraphics(-1, 'c:\FOR\LIB\*.FON')
      CALL Random(rr)
      DO j = 0, 1
        DO i = 0, 5
          CALL Random(rr)
          xdata(i) = rr*10.0
          explode(i).percent = 0.0
          piecolors(i).groupcolor = i + 1
          piecolors(i).grouphatch = i + 1
          IF (i .eq. 2) THEN
            explode(i).explodetrue = .true.
            explode(i).percent = 0.30
          ELSE
            explode(i).explodetrue = .false.
          END IF
        END DO
        titles(0) = 'JAN'
        titles(1) = 'FEB'
        titles(2) = 'MAR'
        titles(3) = 'APR'
        titles(4) = 'MAY'
        titles(5) = 'JUN'

        CALL SetCurrentWindow(2)
        CALL Piechart(xdata,5, piecolors,titles,j,.TRUE.,.TRUE.,explode)
        read(*,*)

        CALL ClearWindow

      END DO
      CALL CloseSEGraphics
      END