PVGadgets_PieChart (GadgetID,ImageID,x,y,w,h,BackColor,PieBack,PieFront,Progress,FontID, [FontColor])

Top  Previous  Next

Create/Update a PVGadgets PieChart Gadget.

 

Use:

PVGadgets_PieChart(#Gadget,#Image,10,10,100,20,-1,$0000FF,$00FFFF,35)

 

 

 

Progress

0 - 100  (representing %)

 

BackColor

$0 - $FFFFFF (RGB values of background color)

-1 - Set Background Color of Form to System Form color

 

PieBack

$0 - $FFFFFF (RGB values of background pie color)

 

PieFront

$0 - $FFFFFF (RGB values of foreground pie color)

 

FontID (optional)

ID of loaded font to use

0 - Use Default System Font

 

FontColor (optional)

$0 - $FFFFFF (RGB values of font color)

Default is Black

 

 

 

 

Example:

 

#ChartGad=1

#ChartImg=1

 

If OpenWindow(0,0,0,220,220,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Pie Chart")

If CreateGadgetList(WindowID())

myfont=LoadFont(1,"Arial",20,#PB_Font_Bold)

 

Repeat

bar+1

If bar>100:bar=0:EndIf

PVGadgets_PieChart(#ChartGad,#ChartImg,10,10,200,200,-1,RGB(160,160,160),RGB(255,255,0),bar,myfont,RGB(0,0,150))

 

Delay(10)

Until WindowEvent()=#PB_Event_CloseWindow

PVGadgets_FreePieChart(#ChartGad,#ChartImg)

EndIf

EndIf