Prueba esto
*The example below creates the simplest pie chart using GDI+.
*!* PROGRAM : UT_SIMPLEPIE.PRG
*!* AUTHOR : CESAR CHALOM
*!* Creates simple pie chart based in the contents of a cursor
*!* Switch llBW from .F. to .T to get a B&W output
CREATE CURSOR sales (nValue N(8,2), cLegend c(6), lDetach l, nColor i, cSliceText c(10))
INSERT INTO sales VALUES (250, "JAN", .F., RGB(0,0,255) ,"")
INSERT INTO sales VALUES (128, "FEB", .T., RGB(0,255,255) ,"")
INSERT INTO sales VALUES ( 90, "MAR", .F., RGB(255,0,255) ,"MAR")
INSERT INTO sales VALUES (330, "APR", .F., RGB(255,160,60),"")
INSERT INTO sales VALUES (250, "MAY", .T., RGB(255,255,0) ,"")
INSERT INTO sales VALUES (150, "JUN", .F., RGB(0,255,64) ,"JUN")
INSERT INTO sales VALUES (180, "JUL", .F., RGB(255,0,0) ,"US$ 180")
INSERT INTO sales VALUES (100, "AUG", .T., RGB(128,128,128),"")
SELECT sales
LOCAL lnTotal, lnStart, lnSweep, llBW
llBW = .F.
*!* llBW = .T. && Uncomment this line to create Black and White charts
CALCULATE SUM(sales.nValue) TO lnTotal
wImg = 200 && Width of image
hImg = 200 && Height of image
*!* Create empty Bitmap
LOCAL loBitmap AS GpBitmap OF ffc/_gdiplus.vcx
loBitmap = NEWOBJECT("GpBitmap", HOME() + "ffc/_gdiplus.vcx")
loBitmap.CREATE(wImg, hImg)
LOCAL loGraph AS GpGraphics OF HOME() + ffc/_gdiplus.vcx
loGraph = NEWOBJECT('GpGraphics', HOME() + "ffc/_gdiplus.vcx")
loGraph.CreatefromImage(loBitmap)
loGraph.Clear(0xFFFFFFFF) && White BackGround
*!* Create the drawing objects
LOCAL loLineColor AS GpColor OF HOME() + ffc/_gdiplus.vcx ;
, loBrushColor AS GpColor OF HOME() + ffc/_gdiplus.vcx ;
, loPen AS GpPen OF HOME() + ffc/_gdiplus.vcx ;
, loBrush AS GpSolidBrush OF HOME() + ffc/_gdiplus.vcx ;
, loBWBrush as GpHatchBrush of HOME() + ffc/_gdiplus.vcx ;
, loBounds AS GpRectangle OF HOME() + ffc/_gdiplus.vcx
loBounds = NEWOBJECT('GpRectangle', HOME() + 'ffc/_gdiplus.vcx','', 0, 0, wImg-1, hImg-1)
loLineColor = NEWOBJECT('GpColor', HOME() + 'ffc/_gdiplus.vcx','', 0,0,0 ) && black
loBrushColor = NEWOBJECT('GpColor', HOME() + 'ffc/_gdiplus.vcx')
loBWBrush = newobject('GpHatchBrush', HOME() + 'ffc/_gdiplus.vcx','' )
loPen = NEWOBJECT('GpPen', HOME() + 'ffc/_gdiplus.vcx','', loLineColor ) && 1-pixel-wide pen
loBrush = NEWOBJECT('GpSolidBrush', HOME() + 'ffc/_gdiplus.vcx','' )
loBrush.CREATE()
* Draw the pie
lnStart = 0
SCAN
lnSweep = sales.nValue / lnTotal * 360
IF llBW
* tnStyle, tvForeColor, tvBackColor
loBWBrush.Create(RECNO()*2, loLineColor, 0xFFFFFFFF)
loGraph.FillPie(loBWBrush, loBounds, lnStart, lnSweep) && draw the slice
loGraph.DrawPie(loPen, loBounds, lnStart, lnSweep) && draw the black contour
ELSE
loBrushColor.FoxRGB = sales.nColor
loBrush.BrushColor = loBrushColor
loGraph.FillPie(loBrush, loBounds, lnStart, lnSweep) && draw the slice
loGraph.DrawPie(loPen, loBounds, lnStart, lnSweep) && draw the black contour
ENDIF
lnStart = lnStart + lnSweep
ENDSCAN
*!* Save Image
loBitmap.SavetoFile("PieBasic.png","image/png")
*!* Show image in MS Internet Explorer
RUN /N explorer.EXE PieBasic.png
Suerte