[分享]VFP_三维饼图示例
* test.prg
PUBLIC oform1
oform1=Newobject("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
BorderStyle = 2
Top = 50
Left = 70
Height = 500
Width = 800
DoCreate = .T.
ShowTips = .T.
Caption = "VFP_三维饼图示例"
MaxButton = .F.
Name = "form1"
ADD OBJECT Container1 AS container WITH ;
Top = 10,;
Left = 16,;
Width = 767,;
Height = 321,;
BackStyle = 0,;
SpecialEffect = 1,;
TabIndex = 24,;
Name = "Container1"
ADD OBJECT Oleboundcontrol1 AS oleboundcontrol WITH ;
Top = 1,;
Left = 3,;
Height = 347,;
Width = 790,;
TabIndex = 25,;
Stretch = 1,;
Name = "Oleboundcontrol1"
ADD OBJECT Command1 AS commandbutton WITH ;
Top = 467,;
Left = 571,;
Height = 25,;
Width = 63,;
Caption = "退出",;
TabIndex = 21,;
Name = "Command1"
PROCEDURE Init
#DEFINE CRLF CHR(13)+CHR(10)
#DEFINE TAB CHR(9)
cCount1 = "cCount1"+TAB+"1600"+TAB+"2840"+TAB+"1890"+TAB;
+"3040"+TAB+"3062"+TAB+"2233"+TAB+"2600"+TAB;
+ "2610"+TAB+"2711"+TAB+"2509"+TAB+"2408"+TAB+"2409"+CRLF
cList = ""+TAB+"A"+TAB+"B"+TAB+"C"+TAB+"D"+TAB+"E"+TAB;
+"F"+TAB+"G"+TAB+"H"+TAB+"I"+TAB+"J"+TAB+"K"+TAB+"L"+CRLF
lcData = cList + cCount1
CREATE CURSOR _ls (cVFPm G)
APPEND BLANK
APPEND GENERAL cVFPm CLASS "MSgraph.chart" DATA m.lcData
THISFORM.Oleboundcontrol1.CONTROLSOURCE = "cVFPm"
THISFORM.OleBoundControl1.autoformat(-4102,5)
THISFORM.Oleboundcontrol1.ChartArea.Font.Size = 13
ENDPROC
PROCEDURE Destroy
USE IN _ls
ENDPROC
PROCEDURE Command1.Click
THISFORM.Release
ENDPROC
ENDDEFINE
===================================================================
研究别人的成果,不够成熟,仅供参考。
[此贴子已经被作者于2017-12-20 10:13编辑过]