#INCLUDE "TOTVS.CH"
#INCLUDE "MSGRAPHI.CH"
user function exemplo()
DEFINE DIALOG oDlg TITLE "Exemplo TMSGraphic" FROM 180,180 TO 550,700 PIXEL
// Cria o gráfico
oGraphic := TMSGraphic():New( 01,01,oDlg,,,RGB(239,239,239),260,184)
oGraphic:SetTitle('Titulo do Grafico', "Data:" + dtoc(Date()), CLR_HRED, A_LEFTJUST, GRP_TITLE )
oGraphic:SetMargins(2,6,6,6)
oGraphic:SetLegenProp(GRP_SCRRIGHT, CLR_LIGHTGRAY, GRP_AUTO, .T.)
// Itens do Gráfico
nSerie := oGraphic:CreateSerie( GRP_PIE )
oGraphic:Add(nSerie, 200, 'Item 01', CLR_HGREEN )
oGraphic:Add(nSerie, 180, 'Item 02', CLR_HRED)
oGraphic:Add(nSerie, 210, 'Item 03', CLR_YELLOW )
ACTIVATE DIALOG oDlg CENTERED
return
|