×
Menu
Index

Charts

 
 
This is a sample program that creates the “Charts.PDF” that is included in this package, by analyzing it, you will be able to see how simple its is, and at the same time how powerful this new class is.
 
  PROCEDURE MAIN
 
fl := 'Charts.Pdf
pdf := xbppdf():New()
dc  := pdf:Create( fl )
pg  := pdf:newpage(XBPPRN_FORM_LETTER)
 
pdf:Font('12.Courier New Bold')
pdf:Text(0.5,2,"Pie Chart Sample")
data := {5,6,1,3,8,9,4,6,1,7}
titu := {'1','22','333','4444','55555','666666','7777777','8888888','99999','000'}
pdf:PieChart(15,30,5,data,titu,"Pie Chart Sample" )
 
pdf:Font('12.Courier New Bold')
pdf:Text(24.5,2,"Line Chart Sample")
data := { {5,6,1,3,8,9,4,6,1,7}, {8,3,7,10,6,8,2,1,3,4} }
titu := {'A','B','C','D','E','F','G','H','I','J'}
pdf:LineChart(44,10,14,50,data,titu,"Line Chart Sample", {GRA_CLR_BLUE, GRA_CLR_RED} )
 
pdf:Font('12.Courier New Bold')
pdf:Text(45.5,2,"Bar Chart Sample")
data := {5,6,0,3,8,9,4,6,1,7}
titu := {'A','B','C','D','E','F','G','H','I','J'}
pdf:BarChart(65,10,14,55,data,titu,"Bar Chart Sample", GRA_CLR_BLUE, GRA_CLR_RED )
 
pdf:enddoc(.t.)
 
  RETURN