// Program : Test en dialogos
// Author : Alfredo Arteaga
// 23/03/2008
/*
Nuevos parámetros para poder mezclar tipo de gráfico por serie
oGraph:AddSerie( aVals, cLegend, nColor, nType, l3D )
*/
#Include "Fivewin.Ch"
#Include "TGraph.Ch"
FUNCTION DlgTest()
LOCAL oDlg, oFont, oGraph1, oGraph2
LOCAL aPers
aPers:={"Ene","Feb","Mar","Abr","May","Jun","Jul"}
DEFINE FONT oFont NAME "MS Sans Serif" SIZE 0,-10
DEFINE DIALOG oDlg RESOURCE "TG_Test" FONT oFont
oGraph1 := TGraph():ReDefine(100,oDlg)
With Object oGraph1
:nType := GRAPH_TYPE_PIE
:l3D := .T.
:lPopUp := .T.
:lLegends:= .F.
:nClrX := CLR_WHITE
:nClrY := CLR_WHITE
:nClrV := CLR_WHITE
:nMaxVal := 50
:cBitmap := ".\Bacalar.Bmp"
:AddSerie({-30,-20, 40, 15, 20, 5, 10},"Serie1",RGB(200, 50, 50),1,.T.)
:AddSerie({ 10, 5, 20, 15, 40,-20,-30},"Serie2",RGB( 50, 50,200),3,.F.)
:SetYVals(aPers)
End With
oGraph2 := TGraph():ReDefine(105,oDlg)
With Object oGraph2
:nType := GRAPH_TYPE_BAR
:l3D := .F.
:lPopUp := .T.
:lDegrade:= .T.
:lLegends:= .F.
:nMaxVal := 50
:nMinVal :=-40
:cBitmap := ".\Brush.Bmp"
:AddSerie({-30,-20, 40, 15, 20, 5, 10},"Serie1",CLR_GREEN ,2,.F.)
:AddSerie({ 10, 5, 20, 15, 40,-20,-30},"Serie2",RGB(218,181, 28),1,.F.)
:SetYVals(aPers)
End With
REDEFINE BUTTON ID 110 OF oDlg ACTION oDlg:End()
ACTIVATE DIALOG oDlg
oFont:End()
RETURN (NIL)