bagi foxer, yang ingin buat grafik pake vfp, nih ada sedikit coding ntuk buat grafik..
simpan dalam program.. semoga bermanfaat..
SET TALK OFF
CLEAR
CREATE CURSOR coba (kode c(2), jml n(3))
INSERT INTO coba (kode, jml) VALUES ('M',65)
INSERT INTO coba (kode, jml) VALUES ('Z',85)
INSERT INTO coba (kode, jml) VALUES ('T',37)
INSERT INTO coba (kode, jml) VALUES ('O',55)
INSERT INTO coba (kode, jml) VALUES ('L',95)
INSERT INTO coba (kode, jml) VALUES ('O',70)
oForm = CREATEOBJECT("Grafik")
oForm.SHow(1)
DEFINE CLASS Grafik as FORM
ADD OBJECT oChart as OLECONTROL ;
WITH OLECLASS="MSChart20Lib.MSCHart.2",Top=0, Left=0,;
Width=This.Width, Height=This.Height
PROCEDURE INIT
LOCAL lnCounter
WITH This.oChart.Object
.RowCount = RECCOUNT('coba')
.RowLabelCount = 1
.Title.Text="Grafik Penjualan"
.ColumnCount = 1
.ChartType=3
.Column = 1
SCAN
.row = RECNO()
.rowlabel=coba.kode
.data = coba.jml
ENDSCAN
ENDWITH
ENDPROC
PROCEDURE DESTROY
USE IN SELECT('coba')
ENDPROC
ENDDEFI