?? chart.tbl
字號:
<?xml version="1.0" encoding="utf-8"?>
<vg version="723" range="0,0,1024,768" papervisible="false">
<sheet name="sheet1">
<楗煎浘 name="楗煎浘1" origin="74,77" bounds="24,27,316,273" shadowvisible="true" shadowoffsetx="4" shadowoffsety="4" shadowalpha="50" Num="5">
<pie name="Arc1" origin="74,77" bounds="24,27,316,273" id="20" EndAngle="126" StartAngle="90" backcolor="$FF" pattern="1"/>
<pie name="Arc2" origin="74,77" bounds="24,27,316,273" id="30" EndAngle="180" StartAngle="126" backcolor="$FFFF" pattern="1"/>
<pie name="Arc3" origin="74,77" bounds="24,27,316,273" id="40" EndAngle="252" StartAngle="180" backcolor="$FF00" pattern="1"/>
<pie name="Arc4" origin="74,77" bounds="24,27,316,273" id="50" EndAngle="342" StartAngle="252" backcolor="$FFFF00" pattern="1"/>
<pie name="Arc5" origin="74,77" bounds="24,27,316,273" id="60" EndAngle="450" StartAngle="342" backcolor="$FF0000" pattern="1"/>
<programe>
<!--
public function GetColor(Index)
return Units[Index].BackColor
end function
private function GetNum()
return UnitCount
end function
public function GetValue(Index)
return Units[Index].Id
end function
property Num read GetNum write SetNum
private function ResetArcs()
i=0
total = 0
while i < UnitCount
total = total + Units[i].Id
i = i + 1
wend
i=0
sa = 90
while i < UnitCount
d = Units[i]
d.StartAngle = CStr( sa )
d.EndAngle = CStr( sa + d.Id * 360 / total )
d.Refresh()
sa = Val( d.EndAngle )
i = i + 1
wend
end function
public function SetColor(Index,AValue)
Units[Index].BackColor = AValue
end function
private function SetNum(AValue)
if AValue >= 1 and AValue <= 10 then
while UnitCount > AValue
DeleteUnit( Units[UnitCount-1] )
wend
while UnitCount < AValue
d = CopyUnit( Arc1 )
wend
ResetArcs()
end if
end function
public function SetValue(Index,AValue)
if( AValue > 0 )
Units[Index].Id = AValue
ResetArcs()
end if
end function
-->
</programe>
</楗煎浘>
<鏂囧瓧楗煎浘 name="鏂囧瓧楗煎浘1" origin="349,234" bounds="281.477074,218.464287,548.880413,482.976751" shadowvisible="true" shadowoffsetx="4" shadowoffsety="4" shadowalpha="50" Num="5">
<pie name="Arc1" origin="349,248" bounds="299,233.4375,543,460" id="20" EndAngle="126" StartAngle="90" backcolor="$FF" pattern="1"/>
<pie name="Arc2" origin="349,248" bounds="299,233.4375,543,460" id="30" EndAngle="180" StartAngle="126" backcolor="$FFFF" pattern="1"/>
<pie name="Arc3" origin="349,248" bounds="299,233.4375,543,460" id="40" EndAngle="252" StartAngle="180" backcolor="$FF00" pattern="1"/>
<pie name="Arc4" origin="349,248" bounds="299,233.4375,543,460" id="50" EndAngle="342" StartAngle="252" backcolor="$FFFF00" pattern="1"/>
<pie name="Arc5" origin="349,248" bounds="299,233.4375,543,460" id="60" EndAngle="450" StartAngle="342" backcolor="$FF0000" pattern="1"/>
<text name="text1" origin="366.119587,473.976751" bounds="364.119587,463.976751,390.119587,482.976751" autosize="true" border="0" fontname="Times New Roman" fontsize="12" textalign="1" text="10%"/>
<text name="text2" origin="283.477074,407.727171" bounds="281.477074,397.727171,307.477074,416.727171" autosize="true" border="0" fontname="Times New Roman" fontsize="12" textalign="1" text="15%"/>
<text name="text3" origin="295.119587,268.877997" bounds="293.119587,258.877997,319.119587,277.877997" autosize="true" border="0" fontname="Times New Roman" fontsize="12" textalign="1" text="20%"/>
<text name="text4" origin="474.466651,228.464287" bounds="472.466651,218.464287,498.466651,237.464287" autosize="true" border="0" fontname="Times New Roman" fontsize="12" textalign="1" text="25%"/>
<text name="text5" origin="524.880413,425.559503" bounds="522.880413,415.559503,548.880413,434.559503" autosize="true" border="0" fontname="Times New Roman" fontsize="12" textalign="1" text="30%"/>
<programe>
<!--
public function GetColor(Index)
return Units[Index].BackColor
end function
private function GetNum()
return UnitCount / 2
end function
public function GetValue(Index)
return Units[Index].Id
end function
property Num read GetNum write SetNum
private function ResetArcs()
i=0
total = 0
n = UnitCount / 2
while i < n
d = Units[i]
total = total + d.Id
i = i + 1
wend
i=0
sa = 90
ac = Units[0]
while i < n
d = Units[i]
d.StartAngle = CStr( sa )
d.EndAngle = CStr( sa + d.Id * 360 / total )
d.Refresh()
ag = sa + d.Id * 180 / total
Units[n+i].MoveTo( ac.Left + ac.Width / 2 - Units[n+i].Width / 2 + ( ac.Width + 40 ) / 2 * cos( ag * 3.1415926536 / 180 ), ac.Top + ac.Height / 2 - Units[n+i].Height / 2 + ( ac.Height + 40 ) / 2 * sin( ag * 3.1415926536 / 180 ) )
Units[n+i].Text = str( d.Id / total * 100, 0 ) + "%"
sa = Val( d.EndAngle )
i = i + 1
wend
end function
public function SetColor(Index,AValue)
Units[Index].BackColor = AValue
end function
private function SetNum(AValue)
if AValue >= 1 and AValue <= 10 then
n = UnitCount / 2
while n > AValue
DeleteUnit( Units[n-1] )
DeleteUnit( Units[UnitCount-1] )
n = n - 1
wend
ac = Units[0]
tt = Units[n]
while n < AValue
d = CopyUnit( ac )
d.SendToBack( true )
d = CopyUnit( tt )
d.BringToFront( true )
n = n + 1
wend
ResetArcs()
end if
end function
public function SetValue(Index,AValue)
if( AValue > 0 )
Units[Index].Id = AValue
ResetArcs()
end if
end function
-->
</programe>
</鏂囧瓧楗煎浘>
<element name="element1" origin="395.5,64.5" bounds="358,44,433,85" shadowvisible="true" shadowoffsetx="4" shadowoffsety="4" shadowalpha="50">
<text name="text1" origin="361,55" bounds="359,45,433,85" autosize="true" border="0" fontname="Times New Roman" fontsize="32" textalign="1" text="Chart"/>
<text name="text2" origin="360,54" bounds="358,44,432,84" autosize="true" border="0" fontname="Times New Roman" fontsize="32" fontcolor="$80FF" textalign="1" text="Chart"/>
</element>
</sheet>
</vg>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -